Advertisement:

Author Topic: MySQL sleeping processes problem  (Read 21843 times)

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #40 on: January 03, 2013, 03:17:16 PM »
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)



Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #41 on: January 03, 2013, 05:13:36 PM »
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.

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #42 on: January 04, 2013, 04:13:47 AM »
It's clear that HS4SMF was the cause.

Anyone has a good alternative for that?

APimage doesn't seem to work with me.

Offline butch2k

  • Full Member
  • ***
  • Posts: 416
  • Gender: Male
    • @butch2k on Twitter
    • Planète Roliste
Re: MySQL sleeping processes problem
« Reply #43 on: January 04, 2013, 08:08:42 AM »
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
Code: [Select]
// Attachments don't require the entire theme to be loaded.
comment 
Code: [Select]
&& (!empty($modSettings['allow_guestAccess']) && $user_info['is_guest'])so that the code looks like this:

Code: [Select]
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.

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #44 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.

Offline butch2k

  • Full Member
  • ***
  • Posts: 416
  • Gender: Male
    • @butch2k on Twitter
    • Planète Roliste
Re: MySQL sleeping processes problem
« Reply #45 on: January 05, 2013, 01:36:42 PM »
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.
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

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #46 on: January 06, 2013, 05:23:21 AM »

Moreover in index.php search for
Code: [Select]
// Attachments don't require the entire theme to be loaded.
comment 
Code: [Select]
&& (!empty($modSettings['allow_guestAccess']) && $user_info['is_guest'])so that the code looks like this:

Code: [Select]
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

Offline butch2k

  • Full Member
  • ***
  • Posts: 416
  • Gender: Male
    • @butch2k on Twitter
    • Planète Roliste
Re: MySQL sleeping processes problem
« Reply #47 on: January 06, 2013, 06:34:21 AM »
copy/paste your code here, you probably misplaced the /* */ or forgot an ;

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #48 on: January 06, 2013, 08:02:23 AM »
OK I forgot to put the ) to close the IF.

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

Offline butch2k

  • Full Member
  • ***
  • Posts: 416
  • Gender: Male
    • @butch2k on Twitter
    • Planète Roliste
Re: MySQL sleeping processes problem
« Reply #49 on: January 06, 2013, 04:20:10 PM »
any error in the javascript console ?

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #50 on: January 10, 2013, 04:43:03 PM »
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?

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #51 on: January 16, 2013, 02:29:10 PM »
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?