Vesta 2.0 is coming soon! See our progress update: https://vestacp.com/docs/vesta-2-update
php-cgi eat up the memory
-
- Posts: 10
- Joined: Fri Mar 14, 2014 5:35 am
php-cgi eat up the memory
I had transfer from virtualmin to Vesta in these days.
My VPS have 2GB ram
When I was in Virtualmin, I use fastcgi and it only use about 500MB ram
After transftered to Vesta, I use phpfcgid, it opened over 160 php-cgi processes and eat up 2GB ram and then use about 700MB swap files
But it's only 2-3 vistors from Google Analytics Real-Time stats
(My website is just 1 small wordpress blog, about 500 pv per day)
Why Vesta opened so many php-cgi process without any purpose?

My VPS have 2GB ram
When I was in Virtualmin, I use fastcgi and it only use about 500MB ram
After transftered to Vesta, I use phpfcgid, it opened over 160 php-cgi processes and eat up 2GB ram and then use about 700MB swap files
But it's only 2-3 vistors from Google Analytics Real-Time stats
(My website is just 1 small wordpress blog, about 500 pv per day)
Why Vesta opened so many php-cgi process without any purpose?

-
- Posts: 36
- Joined: Thu Dec 05, 2013 10:55 am
Re: php-cgi eat up the memory
I think you can limit the cgi-process can be spawn for each user.
-
- Posts: 10
- Joined: Fri Mar 14, 2014 5:35 am
Re: php-cgi eat up the memory
I tried config the php-fpm config file to this value
pm = dynamic
pm.max_children = 4
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.max_requests = 20
but it doesn't help, it still use 2GB ram + 2GB swap
pm = dynamic
pm.max_children = 4
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.max_requests = 20
but it doesn't help, it still use 2GB ram + 2GB swap
-
- Posts: 10
- Joined: Fri Mar 14, 2014 5:35 am
Re: php-cgi eat up the memory
I just build a new server with CentOS 6.5 x64, and just install Vesta CP, and haven't transfer any website yet
It already used about 1GB memory, the httpd used 4217 mb (527.125MB)
Is it used too much memory? I tried other CP but seems they use much less memory


It already used about 1GB memory, the httpd used 4217 mb (527.125MB)
Is it used too much memory? I tried other CP but seems they use much less memory


-
- Posts: 36
- Joined: Thu Dec 05, 2013 10:55 am
Re: php-cgi eat up the memory
No, to see the actual memory consumption is by login to SSH and type free -m.
The memory in the picture shows an allocated memory (served) but not actually being used, so you are okay with it.
The memory in the picture shows an allocated memory (served) but not actually being used, so you are okay with it.
-
- Posts: 10
- Joined: Fri Mar 14, 2014 5:35 am
Re: php-cgi eat up the memory
Thanks
Is there anyway to let vesta kill the zombin processes?
The php-cgi process should auto close when they finish their job.
Is there anyway to let vesta kill the zombin processes?
The php-cgi process should auto close when they finish their job.
Re: php-cgi eat up the memory
Hi,
enterpr1se, why have you stopped services ? (named exim dovecot)
what happened ?
to view memory usage
enterpr1se, why have you stopped services ? (named exim dovecot)
what happened ?
use the commandIt already used about 1GB memory, the httpd used 4217 mb (527.125MB)
Code: Select all
free -m
or
cat /proc/meminfo
-
- Posts: 10
- Joined: Fri Mar 14, 2014 5:35 am
Re: php-cgi eat up the memory
I close them because there are some unknow pop3 and imap process
so I close it and want to free more memory
I tried cat /proc/meminfo
Here is the result

My VPS only have 1 website right now with 500PV per day, I do not think it should use so much resource.
It often got error 500 right now.
Could I change from php-fastcgi to php-fpm? Will php-fpm has better fcgi handling ?
so I close it and want to free more memory
I tried cat /proc/meminfo
Here is the result

My VPS only have 1 website right now with 500PV per day, I do not think it should use so much resource.
It often got error 500 right now.
Could I change from php-fastcgi to php-fpm? Will php-fpm has better fcgi handling ?
Re: php-cgi eat up the memory
your server uses a lot of memory
Try to use the default templates for apache and nginx
Remove please APC
show me result of this command
Try to use the default templates for apache and nginx
Remove please APC
Code: Select all
yum remove php-pecl-apc
Code: Select all
top
-
- Posts: 10
- Joined: Fri Mar 14, 2014 5:35 am
Re: php-cgi eat up the memory
I had unloaded php-apc
I tried use default settings before, it will use less memory at beginning, but it will slowly increase the memory usage, after 3-4 days, it will use up 2GB ram + 1GB swap.
I had change the default settings and reboot, after 18hr, it used most memory.

I tried use default settings before, it will use less memory at beginning, but it will slowly increase the memory usage, after 3-4 days, it will use up 2GB ram + 1GB swap.
I had change the default settings and reboot, after 18hr, it used most memory.
