Too many PIDs (httpd+mysqld) then mysqld hangs and server get slow

y0us3f

Verified User
Joined
Jul 6, 2011
Messages
18
hello guys , i've a problem with my server sometimes its fine sometimes i get this annoying problem

i get so many PIDs on httpd and mysqld then the whole server goes slow and the site won't open "Database Error"

then I stop the services for 5 hrs or more ... open it again it starts fine and sometimes work for more than a week with no problems at all

and now i just got the problem back , i stopped services for 6 or more hrs and still the same problems

i start the services , 20 seconds later ... the PIDs increase and the site stops same problem again.

I tried optimizing apache and mysql , nothing helped.

Screenshot attached
 

Attachments

  • toomanypids.jpg
    toomanypids.jpg
    223.9 KB · Views: 249
About MySQL: the scripts you are using do they have also mysql_close(); or does it only open connections but not closing??

For apache you should check the server-status what is causing this. You can enable this in the httpd-info.conf file
 
and now even more ....

daveyw : thanks for replying , the scripts im using and famous scripts , vBulletin and Wordpress

sometimes the server works for a week or more , and sometimes i get this problem , even if i reboot the server , after 20 secs i get the same.

could it be an attack ? or something ?

---------

i will see server-status now .. is it like . logging ?
 

Attachments

  • toomanypidsmore.jpg
    toomanypidsmore.jpg
    397 KB · Views: 164
The current screenshots are useless, we need specifications.
Try to check server-status, and give us the result of the query: "show full processlist"

Also reboot doesn't resolve problems, it only moves problems temp.
 
i know it'll fix the problem temporary :) because i didnt get the solution yet

where can i find httpd-info.conf ?

( problem happens only if i started mysqld service with httpd )
 
SeLLeRoNe : hey :)

Thanks , will see the server-status now

AMD Phenom(tm) II X4 840 Processor , 2gb ram

I don't think its from the server specs , it works fine and I see there is enough free ram , and CPU Usage is fine

is it possible that it is being attacked ? , cause it can work for 2 weeks with no problems .. suddenly this happens ... and when I stop it ... open it after hours .. or a day , it works fine again
 
i've changed the http-info.conf

to

<Location /secret-server-status>
SetHandler server-status
</Location>

2nd method ..

how can I use it now ? and track website ?
 
For sure is an overload from web (including mysql query for each page loaded) so thats why many pids on httpd and mysql...

Actually, i dont know how wordpress work, but i would suggest you to search on google something about that query.

Regards
 
I will send you PM screenshot of the PIDs , many of them are from the tags so i dnt know ..
 
Screenshot of Server-Status

attached
 

Attachments

  • serverstatus.jpg
    serverstatus.jpg
    306.9 KB · Views: 222
I'd install mod_security2 as the requests look suspicious to me..

NOTE: what language is the site?
 
Last edited:
Also mod_ruid2 should be helpful... and.. but not sure, eaccelerator for have a bit of caching for make clients connection little speedy...

Regards
 
@y0us3f

nginx (with limits on connections)+apache (with lowered params)+mod_ruid2+APC (or eAccelerator)+tunned php.ini+tunned me.cnf should help you.

p.s. Lines with number of requests per seconds are omitted. That's bad.
 
Man i would shut down that one domain...something weird going on there.
 
I agree with scsi. It's either a badly broken script or an attack.

Jeff
 
In case it is an attack, an attacker would get what he wants, as soon as domain would be switched off. Why should the TS help him?
 
Indeed, as many people say: Suspend the domain.
It costs too much time to fix this, just shutdown the site and let them make a good site, not a broken / leaky website.
 
Back
Top