MicrostockGroup Sponsors


Author Topic: Hosting site says I have Long-Running MySQL Queries  (Read 2078 times)

0 Members and 1 Guest are viewing this topic.

« on: March 02, 2014, 11:58 »
0
Just got this e-mail from my hosting company :P
The only thing I thought was that it is searching my linked databases and that is what is taking so long, and if so wouldn't their servers just be inactive waiting for the results?
Any ideas?

>>System administration has been tracking higher resource usage on your server and has traced some of these issues to your account having longer running mySQL queries.

In a shared environment, most queries should complete in less than a second. Some of the queries related to your account take a lot longer than this to complete and cause latency issues that we are seeing in server response.

Here are examples of such queries:

| xxxxxx | xxxxxxxxx | localhost | xxxxxxxx | Query | 173 | Copying to tmp table | SELECT wp_posts.* , count(distinct tr.term_taxonomy_id) as termcount FROM wp_posts INNER JOIN wp_term_relationships tr ON (wp_posts.ID = tr.object_id) INNER JOIN wp_term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) WHERE post_type = 'image' AND (post_status = 'publish') AND wp_posts.ID NOT IN (1713) AND ( tt.term_id IN (756, 757, 758, 54, 55, 56, 58, 276, 342, 68, 72, 73, 134, 311, 74, 79, 82, 83, 256, 90, 91, 37, 38, 44, 820, 286, 93, 94, 225, 226, 320, 100, 101, 260, 121, 108, 109, 110, 111, 40, 39, 123, 265, 122, 117, 118, 560) ) GROUP BY wp_posts.ID
HAVING SUM(CASE WHEN tt.term_id IN (756, 757, 758, 54, 55, 56, 58, 276, 342, 68, 72, 73, 134, 311, 74, 79, 82, 83, 256, 90, 91, 37, 38, 44, 820, 286, 93, 94, 225, 226, 320, 100, 101, 260, 121, 108, 109, 110, 111, 40, 39, 123, 265, 122, 117, 118, 560) THEN 1 ELSE 0 END) > 0 ORDER BY wp_posts.post_date DESC

In order to maintain stability and responsiveness our shared environment, you will need to review your site to see if you can make any changes that can increase the efficiency of these queries. If you cannot control your resource usage, we may be forced to suspend your account, and you will need to find alternative hosting.

Thank you in advance for your cooperation, and feel free to let us know if you have any further questions or if we can be of assistance.<<


« Reply #1 on: March 02, 2014, 15:20 »
0
who's your hosting company?  1 sec seems incredibly stingy for searches.
I must tried to view your site, and when I click on one of the categories, it takes a really long time to display - well over 10 sec.  it may just be that your server is slow or has a lot of traffic -- these requests wouldn't look at any of your networked links.

the symbiocard.xml and image_info files look fine

which plugins do you have active?  make sure you have all the required plugins activated; then deactivate wordfence or other 'extras' to see if that makes a difference

« Reply #2 on: March 02, 2014, 22:51 »
0
Thanks for the heads up!!
Wow, just did a search and see what you're saying. They recently moved servers so I'll have to get back in touch with them, maybe it's on their end! Before the switch the search worked very quickly, right now it's hanging for me! BTW its Webhostinghub.com.

« Reply #3 on: March 05, 2014, 11:53 »
0
Steve, thanks for the help.

The main culprit was "Related Posts by Taxonomy"

Even after deactivating it, it kept running! I had to go to my FTP program and delete all of the files of it in plugins folder.

After that the next busy plugin was SlimStat. After deactivating that one the site again moves pretty well.

I installed a plugin called  P3 (Plugin Performance Profiler) which shows plugin load times for the pages.

I would like to run the Related Posts by Taxonomy to show similar images but can't because of the cost of the slow down.

I'll look into a similar plugin.


 

Related Topics

  Subject / Started by Replies Last post
8 Replies
4355 Views
Last post December 16, 2013, 20:11
by Jo Ann Snover
6 Replies
4158 Views
Last post July 15, 2009, 18:02
by travelstock
4 Replies
2005 Views
Last post March 20, 2013, 20:23
by Leo Blanchette
80 Replies
18719 Views
Last post October 28, 2013, 15:14
by scooty
11 Replies
6353 Views
Last post July 06, 2013, 01:02
by TheDrift-

Sponsors

Microstock Poll Results