MySQL sleeping processes problem

Started by jan.van.gent, September 16, 2012, 03:55:17 PM

Previous topic - Next topic

jan.van.gent

It's is running slow again atm:

Operating System:   Linux 2.6.32-042stab053.5
Processor:   Intel® Xeon® CPU L5520 @ 2.27GHz (376.838MHz)
Load averages:   9.81, 4.00, 3.55
Current processes:   95 (86 sleeping, 8 running, 1 zombie)
Processes by CPU:   apache2 (66) 77.6%, mysqld (1) 4.7%, (other) (21) 0.0%
Memory usage:    87.573% (1836532k / 2097152k)
Swap: 0% (0k / 0k)
MySQL processes
Total processes:   25 (24 sleeping, 1 running, 0 locked)
MySQL Statistics
MySQL 5.0.x
Connections per second:    2.6235
Kilobytes received per second:    7.8861
Kilobytes sent per second:    39.5593
Queries per second:    35.3815
Percentage of slow queries:    0
Opened vs. Open tables:
(table_cache)    1336.4844 (should be <= 80)
Table cache usage:
(table_cache)    1 (should be >= 0.5 and <= 0.9)
Key buffer read hit rate:
(key_buffer_size)    0.0044 (should be <= 0.01)
Key buffer write hit rate:
(key_buffer_size)    0.0919 (should be <= 0.5)
Thread cache hit rate:
(thread_cache_size)    76.2202 (should be >= 30 )
Thread cache usage:
(thread_cache_size)    0.375 (should be >= 0.7 and <= 0.9)
Temporary table disk usage:
(tmp_table_size)    0.0199 (should be <= 0.5)
Sort merge pass rate:
(sort_buffer)    0 (should be <= 0.001)
Query cache enabled:
(query_cache_type)    1 (should be >= 1 and <= 1)
Query cache miss rate:
(query_cache_limit)    0.428 (should be <= 0.5)
Query cache prune rate:
(query_cache_size)    0.0746 (should be <= 0.05)



jan.van.gent

I uninstalled highslide4smf. Problem seems solved.
Server is realy fast now...

Now i'll let it test run for 2 days. Afterwards I will install APimage.

jan.van.gent

It's clear that HS4SMF was the cause.

Anyone has a good alternative for that?

APimage doesn't seem to work with me.

butch2k

hummm AFAIR the default install of hs4smf uses preloading.

Set hs.cacheAjax to false (in the h4smf.php) in case you rely on hs4smf for loading webpages, else it will load the pages even before they are opened causing a vast amount of traffic server side.

Moreover in index.php search for
// Attachments don't require the entire theme to be loaded.

comment  && (!empty($modSettings['allow_guestAccess']) && $user_info['is_guest'])
so that the code looks like this:

if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'dlattach')/* && (!empty($modSettings['allow_guestAccess']) && $user_info['is_guest'])*/
detectBrowser();
else
loadTheme();

(It will deactivate theme loading for attachments)

and then test again with hs4smf.

jan.van.gent

I can't seem to find the HS4SMF.php, in what folder should i find that?
I did find hs4sm-subs.php but that does not contain hs.cacheAjax.

butch2k

Quote from: jan.van.gent on January 05, 2013, 11:03:53 AM
I can't seem to find the HS4SMF.php, in what folder should i find that?
I did find hs4sm-subs.php but that does not contain hs.cacheAjax.
Quote from: jan.van.gent on January 05, 2013, 11:03:53 AM
I can't seem to find the HS4SMF.php, in what folder should i find that?
I did find hs4sm-subs.php but that does not contain hs.cacheAjax.
that's the one !
in hs4smf_prepare_footer add:
$footer .= 'hs.cacheAjax = false;' ."\n";
before    
// Caption text Mode

jan.van.gent

Quote from: butch2k on January 04, 2013, 08:08:42 AM

Moreover in index.php search for
// Attachments don't require the entire theme to be loaded.

comment  && (!empty($modSettings['allow_guestAccess']) && $user_info['is_guest'])
so that the code looks like this:

if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'dlattach')/* && (!empty($modSettings['allow_guestAccess']) && $user_info['is_guest'])*/
detectBrowser();
else
loadTheme();

(It will deactivate theme loading for attachments)

and then test again with hs4smf.

I tried to do this but than I got:
Parse error: syntax error, unexpected T_STRING in /var/www/vhosts/bimmerboard.be/httpdocs/forum/index.php on line 216

butch2k

copy/paste your code here, you probably misplaced the /* */ or forgot an ;

jan.van.gent

OK I forgot to put the ) to close the IF.

But there is still a problem, now Highslide isn't functioning  ;)
What to do?

butch2k

any error in the javascript console ?

jan.van.gent

These are the errors I see every member has

84.194.92.149   8: Undefined index: hs4smf_img_count
?topic=38348.30;topicseen   Vandaag om 22:36:10
84.194.92.149   8: Undefined index: hs4smf_img_count
?topic=33465.msg1012073   Vandaag om 22:30:05
84.194.92.149   8: Undefined index: hs4smf_img_count
?topic=33465.240;topicseen   Vandaag om 22:25:15
84.194.92.149   8: Undefined index: hs4smf_img_count
?topic=37293.0;topicseen   Vandaag om 22:19:38
84.194.92.149   8: Undefined index: tp_pushEnabled
?action=pm;sa=send2   Vandaag om 22:19:30
84.194.92.149   8: Undefined index: hs4smf_img_count
?topic=13799.5100;topicseen   Vandaag om 22:18:01
84.194.92.149   8: Undefined index: hs4smf_img_count
?topic=33465.new   Vandaag om 22:17:52
84.194.92.149   8: Undefined index: hs4smf_img_count
?topic=33465.msg1012045   Vandaag om 22:17:46
84.194.92.149   8: Undefined index: hs4smf_img_count
?topic=38171.0;topicseen   Vandaag om 22:04:03
84.194.92.149   8: Undefined index: hs4smf_img_count
?topic=33465.new   Vandaag om 22:03:32
84.194.92.149   8: Undefined index: hs4smf_img_count
?topic=33465.240

etc.

Any idea?

jan.van.gent

I still have problems.
Server CPU is 100% at evenings, while RAM usage is low.
Any ideas?

Could it be caused by those hs4smf errors? Something else?
Please?

Advertisement: