Current time: 11-16-2024, 09:47 AM Hello There, Guest! (LoginRegister)


Post Reply 
vu2005 php5-cgi
Author Message
legion726 Offline
Junior Member
*

Posts: 19
Joined: Dec 2009
Reputation: 0
Post: #1
vu2005 php5-cgi
Everyone Welcome

Comp Server: AMD Athlon™ 64 Processor 3200+
RAM: 1GB
Debian 5, ispCP Omega 1.0.3-1

Worth 7 sites, and has a 1 GB is free 20-40MB of RAM

Quote:top - 17:41:59 up 4:40, 1 user, load average: 1.80, 1.11, 0.86
Tasks: 168 total, 6 running, 162 sleeping, 0 stopped, 0 zombie
Cpu(s): 59.8%us, 38.2%sy, 0.0%ni, 1.7%id, 0.0%wa, 0.3%hi, 0.0%si, 0.0%st
Mem: 962740k total, 950756k used, 11984k free, 23688k buffers
Swap: 2819368k total, 728k used, 2818640k free, 212376k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2155 mysql 20 0 242m 56m 6160 S 58.8 6.0 56:31.07 mysqld
14591 vu2003 20 0 133m 15m 3708 S 8.0 1.6 0:08.92 php5-cgi
14638 vu2003 20 0 133m 14m 3712 R 4.7 1.6 0:08.96 php5-cgi
15259 vu2003 20 0 134m 16m 3196 S 4.0 1.8 0:01.54 php5-cgi
14517 vu2005 20 0 126m 9752 3592 S 2.7 1.0 0:04.04 php5-cgi
14557 vu2005 20 0 128m 9.9m 3892 S 2.0 1.1 0:03.14 php5-cgi
14635 vu2003 20 0 133m 13m 3716 S 2.0 1.5 0:10.06 php5-cgi
14516 vu2004 20 0 131m 11m 4024 S 1.3 1.2 0:04.88 php5-cgi
14579 vu2005 20 0 126m 9832 3492 S 1.3 1.0 0:03.18 php5-cgi
14580 vu2005 20 0 128m 9.9m 3848 S 1.3 1.1 0:02.76 php5-cgi
15205 vu2005 20 0 124m 7292 3392 S 1.3 0.8 0:00.98 php5-cgi
14434 root 20 0 61856 14m 2528 S 0.7 1.5 0:00.64 ispcp-apache-lo
14520 vu2005 20 0 129m 11m 4348 R 0.7 1.2 0:04.16 php5-cgi
14523 vu2005 20 0 128m 9796 3832 S 0.7 1.0 0:02.18 php5-cgi
14525 vu2005 20 0 128m 9.8m 4136 S 0.7 1.0 0:02.82 php5-cgi
14527 vu2005 20 0 126m 9.8m 3552 S 0.7 1.0 0:02.14 php5-cgi
14529 vu2005 20 0 128m 9644 3640 R 0.7 1.0 0:02.72 php5-cgi

What to do, how to clean the memory?

P.S: Sorry do not know much English
01-09-2010 01:44 AM
Find all posts by this user Quote this message in a reply
motokochan Offline
Member
***

Posts: 274
Joined: Jul 2008
Reputation: 1
Post: #2
RE: vu2005 php5-cgi
Clean? What do you mean? It looks like a busy server with enough memory to keep the swap from being used a lot. That looks fine to me.
01-09-2010 02:23 AM
Visit this user's website Find all posts by this user Quote this message in a reply
legion726 Offline
Junior Member
*

Posts: 19
Joined: Dec 2009
Reputation: 0
Post: #3
RE: vu2005 php5-cgi
I was leading a little to reduce the load on the server. At servake is current ISPCP

Debian 5 x64
(This post was last modified: 01-09-2010 02:43 AM by legion726.)
01-09-2010 02:30 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: vu2005 php5-cgi
Do you use fastcgi or fcgid?
01-09-2010 02:46 AM
Visit this user's website Find all posts by this user Quote this message in a reply
legion726 Offline
Junior Member
*

Posts: 19
Joined: Dec 2009
Reputation: 0
Post: #5
RE: vu2005 php5-cgi
No, everything is by default after the installation as ispcp
I do not even know why you need itSmile
The main thing that would work sites
(This post was last modified: 01-09-2010 02:57 AM by legion726.)
01-09-2010 02:56 AM
Find all posts by this user Quote this message in a reply
pgentoo Offline
Member
*****
Dev Team

Posts: 326
Joined: Mar 2007
Reputation: 0
Post: #6
RE: vu2005 php5-cgi
This is a lot of php5-cgi processes for one site (vu20005). Unless you did this on purpose because that site is under heavy load, i'd trim it down.

I believe the default settings in php5-fcgi-starter script cause issues which may be what you are seeing. I found with the default settings many more php5 processes would be started, and a lot of times they woudl not be shutdown on an apache restart (like they should).

I proceeded to modify my starter script as follows, and haven't had any issues since (several months back). There are a few threads on this same issue if you search for "php5-fcgi-starter" in the forum. I believe the finding was that php.net recommends against using php's "child process management" and using fastcgi/fcgid's built in support instead.

Example (see commented out lines):

Code:
#!/bin/sh

umask 022

PHPRC="/var/www/fcgi/mydomain.com/php5/"

export PHPRC
#PHP_FCGI_CHILDREN=2
#export PHP_FCGI_CHILDREN
#PHP_FCGI_MAX_REQUESTS=500
#export PHP_FCGI_MAX_REQUESTS

exec /usr/lib/php5/bin/php-cgi

Give this a try and see how it works for you. As i noted, you may need to stop apache, kill left over php5-cgi processes, then start apache so orphaned processes aren't left behind after the config change.

-
pgentoo
01-09-2010 07:28 AM
Find all posts by this user Quote this message in a reply
just_hoster Offline
Junior Member
*

Posts: 22
Joined: Jan 2010
Reputation: 0
Post: #7
RE: vu2005 php5-cgi
i have the same problem... cgi and mysql uses about 60% cpu....


any idea?
01-20-2010 10:06 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)