0

I have a VPS (AMP server), and have 3 accounts (websites) under it. The problem started when my main website stopped working and gave me DB error (cannot connect to db). The other two websites were working but they were very very slow. I connected to my main website account through SSH (putty) and it gave me this error:

-bash: fork: retry: Resource temporarily unavailable

Then, I logged to the cPanel of my account and went to check the database with phpmyadmin, but it was continuously asking for log in, and after few seconds it log out...

I logged to my root through SSH with no errors, checked the space and I had more than 50% free space.

I logged into WHM (root) and checked the database with phpmyadmin, I noticed that the session table is abnormally very big, and hundreds of rows are added every second. I suspended the account, and emptied the sessions table, and then unsuspend the account, the table started to fill up at the same rapid rate. I rebooted the whole system, but the problem stayed. I resuspended the account, and checked the two other websites, they were working fine. I have no clue what caused the problem, and how to solve it.

MadHatter
  • 78,442
  • 20
  • 178
  • 229
irza
  • 103
  • 4

1 Answers1

1

The bash error implies that you over the limits for open files or processes - but since your user account should be completely seperate from the database and webserver accounts then this implies that the system is running out resources - which is not a good situation.

It may simply be under-provisioned, but it could be that there's a fork bomb (either deliberate or accidentally) running on the system.

A starting point would be to look at your webserver log files and see if the behaviour is being driven by traffic volumes. This should also alow you to identify if any of the pages are making recursive HTTP calls.

symcbean
  • 19,931
  • 1
  • 29
  • 49
  • maybe it's fork bomb as you say. I cannot view the log file as its size is about 900MB!! – irza Sep 24 '13 at 11:15