[Due to server hardware (Hard disk) ?] DB Table crash due to hit counting

More
8 years 9 months ago - 8 years 8 months ago #55739 by iamrobert
Hi,

My db has been crashing recently. The hosting company is telling me:

"I have checked the logs and I believe that the issues with your server are due to the fact that your website generates slow MySQL queries which overloaded the server. "

Here's some of the slow mysql queries:
UPDATE xxx_content SET hits=hits+1 WHERE id = 897
Executed 1303 min ago for 10 sec on Database --> .
UPDATE xxx_flexicontent_items_tmp SET hits=hits+1 WHERE id = 858

Finally they recommend:
"I advise you to first check the plugin/extensions which makes this query "SET hits=hits+1". Probably this is extension/plugin that counts the hits and takes too many system resources. "

I also did a google on the issue and came across this:
www.itoctopus.com/subqueries-a-major-cau...-on-a-joomla-website
and it says " query within a query " from FLEXIcontent leads to slow load times and discusses the hits issue.

Now - I'm not an expert with these issues and the site is running "FLEXIcontent version 2.3.0 dev" - so it does need an update.

But - I am thinking long-term that this a major issue and has it been fixed?

Thanks,

Robert
Last edit: 8 years 8 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago - 8 years 9 months ago #55741 by ggppdk
Hello

in file
plugins/flexicontent/system/flexisystem/flexisystem.php

put this line into comments:
if ( $app->isSite() )$this->countHit();

How many visitors and views does your website have ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 8 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago - 8 years 9 months ago #55742 by iamrobert
Thanks ggppdk.

It has 9000 - 12000 sessions a month. 20,000 - 23,000 page views.
I will add the comment.

Is there any truth to what itoctopus is saying?

Also - its not a cheap host - its SiteGround Cloud - www.siteground.com/cloud-hosting.htm
Last edit: 8 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago - 8 years 9 months ago #55743 by ggppdk
Hello

hhmm,
the query is updating specific row, it should be able to handle easily 100x than that


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 8 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago - 8 years 9 months ago #55744 by ggppdk
Hello

how many items do you have ?
maybe backup and convert the tables to InnoDB which has better locking than MyIsam tables


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 8 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago - 8 years 9 months ago #55745 by ggppdk
also i forgot, is unique counting enabled ? it will reduce the number of time that the table is updated


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 8 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.293 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline