Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

mySQL load is hight on 4.4.1 - performance is bad (lots of private messages)

6 years 7 months ago
  • Nicolai's Avatar
    Topic Author
  • Nicolai
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 1
Licenses:
JomSocial Active iSEO Active Socialize Active

Hi,

Even after changing refresh timers on Chat module to 60/60 my mySQL server is really loading up and making the entire site slow (it was not an issue before).

I also have reports from a user that the photo albums keeps loading. Most likely due to the general performance of the server.

The server is pretty high specs for a low-traffic site. And there where no performance problems before I upgraded. I assume this is due to an extreme amounts of private messages in the system (300.829 records in jos_community_chat_activity). But I really find it a pity if the new private message system drags down performance like this - especially since we cannot choose to stay on the old system.

Is there an index we could create on the server to speed things up? Or are there a filter clause missing in the code so it does not traverse all 300K records all the time?

Also please note - only the front end of the site is slow, the back end - as well as the other web sites running on the same server is still fast as ever.

Thanks
Nicolai

6 years 7 months ago
Licenses:

HI, Nicolai.

Thank you for contacting us.
I assign developer to investigate this further.
He'll contact you ASAP.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
6 years 7 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

If its coming from chat please you change "Checking for new messages in active chat" and "Checking for new messages in other chats" to bigger value..

thank you!

6 years 7 months ago
  • Nicolai's Avatar
    Topic Author
  • Nicolai
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 1
Licenses:
JomSocial Active iSEO Active Socialize Active

Hi Dimas,

Thank you - I already set them to 60 seconds yesterday. Both of them.

I'm in the process of adding Webmin access, i'll add the info to the original post in a minute.

Checking processes I have identified the queries that seem to take a long time:
SELECT id FROM jos_community_chat_activity WHERE chat_id = 3092 AND user_id = 64 ORDER BY id DESC LIMIT 1
SELECT id FROM jos_community_chat_activity WHERE chat_id = 3774 AND user_id = 64 ORDER BY id DESC LIMIT 1
SELECT id FROM jos_community_chat_activity WHERE chat_id = 7976 AND user_id = 2838 ORDER BY id DESC LIMIT 1

6 years 7 months ago
  • Nicolai's Avatar
    Topic Author
  • Nicolai
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 1
Licenses:
JomSocial Active iSEO Active Socialize Active

Okay I think I have solved it now by creating an index.

I logged slow queries and identified

SELECT ca.*
                FROM jos_community_chat_activity ca
                LEFT JOIN jos_community_chat_participants cc ON ca.chat_id = cc.chat_id
                LEFT JOIN jos_community_chat c ON c.id = ca.chat_id
                WHERE cc.user_id = 64
                AND cc.enabled = 1
                ORDER BY ca.id DESC LIMIT 1

It took 25 seconds for this query

I then ran
ALTER TABLE `jos_community_chat_activity` ADD INDEX `NWH_chat_id` (`chat_id`);

Now same query took 0.03 seconds

Links used (professionally we use MSSQL so I had to look it up):
dev.mysql.com/doc/refman/5.7/en/slow-query-log.html
techjoomla.com/developers-blogs/joomla-d...r-joomla-tables.html

Might be worth putting the index into the definition.

Best regards
Nicolai

The following user(s) said Thank You: Jonas
6 years 7 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Nicolai,

Nice found.. we will improve it.. I already reported this to our developer.

thank you!

6 years 6 months ago
Licenses:
JomSocial Active Socialize Active

Hello

I am experiencing similar speed issue on Jomsocial 4.4.5. Can you please advise where I should add the script that worked for Nicolai:

ALTER TABLE `jos_community_chat_activity` ADD INDEX `NWH_chat_id` (`chat_id`);

Thank you

Richard

6 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Richard,

Run that code via phpmyadmin, and change the prefix "jos_" with your own table prefix.

thank you!

6 years 6 months ago
Licenses:
JomSocial Active Socialize Active

Hi Dimas

Sorry to be so stupid but I don't know what table prefix I should change?

Richard

6 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,
Look Joomla configuration->Server->Database Tables Prefix, you can know the table prefix from there :)

6 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,
Look Joomla configuration->Server->Database Tables Prefix, you can know the table prefix from there :)

6 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,
Look Joomla configuration->Server->Database Tables Prefix, you can know the table prefix from there :)

6 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,
Look Joomla configuration->Server->Database Tables Prefix, you can know the table prefix from there :)

6 years 6 months ago
Licenses:
JomSocial Active Socialize Active

Not really sure how to do this. I have given you the necessary access details. Could you please do this for me?

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW