Web Hosting Talk







View Full Version : Out of memory problems


WildWayz
12-07-2001, 05:19 PM
hi ya

All this week, the memory on the server has become full - no idea why :/

ps -aux shows absolute shedloads of Apache/MySQL processes - can I find out who is running them?
It is showing as mysql/nobody as the owner :/

I feel someone is abusing the server :/

--James

bobcares
12-08-2001, 09:57 AM
Apache basically runs as nobody:nobody. So this could be any virtual hosting account.
You could try netstat and see the connection and look for those using scripts.

Have a great day :)

regards
amar

Varun Shoor
12-08-2001, 01:48 PM
Originally posted by WildWayz
hi ya

All this week, the memory on the server has become full - no idea why :/

ps -aux shows absolute shedloads of Apache/MySQL processes - can I find out who is running them?
It is showing as mysql/nobody as the owner :/

I feel someone is abusing the server :/

--James

EXACTLY the same problem I ran into.

To check the mysql processes login into mysql as root and type: "show processlist;"

Some person didnt close the mySQL connections so it ran a whole lot of mysql processes what I did was start safe_mysqld as: "/usr/local/bin/safe_mysqld --user=mysql --basedir=/usr/local --datadir=/var/db/mysql --set-variable=max_connections=500 --set-variable=wait_timeout=200"

That automatically flushed idle connections after 200 seconds and mySQL has been running without a problem now.

You can do the same with Apache ie Reduce or Increase the # of Connections and set Timeouts (Not sure if apache supports it, I havent run into any kind of problem with Apache so havent done much research on this, but it should)

Hope that helps :D