php5-cgi huge memory usage - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Development Area (/forum-1.html) +--- Forum: General discussion (/forum-11.html) +--- Thread: php5-cgi huge memory usage (/thread-11541.html) |
php5-cgi huge memory usage - bleed - 08-30-2010 06:26 AM I'm using ispCP for 3 month now. At first I didn't noticed, but now (for about month) php5-cgi processes ar using a lot of memory: Code: 29329 vu2080 230356 kB /usr/bin/php5-cgi I think it's way too much. I'm running on Ubuntu Linux 9.10 Linux 2.6.31-22-generic on x86_64 AMD Phenom II X6 1055T Processor, 6 cores, 4GB of RAM using latest ispCP Omega 1.0.6 I tried to change some apache2 configuration, but finally came back to default. If needed some specific configuration details - just ask! What might it be? Some kind of bug or just because of my "knowledge" of linux and running servers? RE: php5-cgi huge memory usage - joximu - 08-30-2010 08:12 PM It's ok to use the memory which is available. It's only a problem if the need of RAM is hight than the available.... But sometimes there are "lost" php-processes which consume cpu-load and memory. They can be killed. If you give the command how you go the list above - we can compare... /J RE: php5-cgi huge memory usage - bleed - 08-30-2010 11:15 PM I'm just beginner at linux. I used webmin to get that list. Don't know if it's also normal, but RAM is full and also 2GB of swap is beeing used. RE: php5-cgi huge memory usage - vanshyr - 09-03-2010 01:21 AM In shell prompt type the comand (as root): ps aux It output a list of proceses used by all users, all programs and how much memory they are using. maybe other process and not php/apache is using the big part of ram. If i do it returns this: Code: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND look i have many process too, but they consume 0.01 of Mem and 0 CPU, except the first one (1,7 Mem), an antivirus system, maybe in that moment it was analizing some file. anf if i take a look at my memory usage right now: Code: free -m It seems that i have only 255 Mem free, but look at line 'buffers/cache' it have 7266Mb cached (can be replaced by differents process but is 'free' for be occuped by who needs). Using swap memory 'nots good' it means that you lack Ram and need to 'virtualize' it in HDD. So try the above command and try to find what process its really using the ram. (You should to evaluate too, how many users you have?, maybe the RAM is well used but you need to put more ram on the server). (08-30-2010 11:15 PM)bleed Wrote: I'm just beginner at linux. I used webmin to get that list. RE: php5-cgi huge memory usage - Kwik - 10-27-2010 05:15 PM I have the same problem for two days now. Code: vu2012 4374 77.8 0.1 81060 7940 ? R Oct26 626:20 /usr/bin/php5-cgi The problem is that it uses a lot of cpu. I could kill them manually, but this wont stop it from happening again. Server has an uptime for 59 days and I didnt change anything but it started yesterday. I rebootet the server and I have the same problem today (yesterday there where a lot more processes, the server had a load average of 22 - 4gb ram amd 2 cpus debian etch, ispcp 1.0.6). All the processes belong to the same virtual host. Any ideas how to prevend this from happening? RE: php5-cgi huge memory usage - pgentoo - 10-30-2010 06:56 AM Is the website that is hosted on that account getting tons of traffic? That would be my first thing to check. Maybe the load isn't caused by "a problem", but more a result of increased traffic. RE: php5-cgi huge memory usage - Kwik - 10-30-2010 08:09 AM The traffic is pretty much the same. Seems to me that a few processes just dont stop running. RE: php5-cgi huge memory usage - kilburn - 10-30-2010 05:27 PM Use "strace" to see what are the processes doing. Something similar happened to me once, and it was a silly programing mistake. Basically, the website had an "admin area" where the website owner could add/remove ad banners, and then two of them were shown randomly. At some point, the owner decided to remove all the banners but one, so the website ended up looping indefinitely trying to chose the second one. RE: php5-cgi huge memory usage - kassah - 10-31-2010 01:28 AM Isn't that what php execution time limit is for? or did he disable that? RE: php5-cgi huge memory usage - kilburn - 11-02-2010 06:02 AM Yes and no. The default time limit is 30s, so if you have more than one request every 30s the process count will keep rising and rising until your server is starved. |