Current time: 05-01-2024, 09:50 PM Hello There, Guest! (LoginRegister)


Post Reply 
Problema con procesos php5-cgi!
Author Message
sercba Offline
Junior Member
*

Posts: 51
Joined: Aug 2008
Reputation: 0
Post: #11
RE: Problema con procesos php5-cgi!
Muchachos, perdon por tardar tanto en volver! Tuve algunos problemas económicos que me dejaron fuera de circulación por algunos días!

Sigo con el problemita, en menor medida ya que aumenté la memoria de mi servidor a 2GB y mato los procesos "colgados" de vez en cuando.

Viendo por ahí los archivos de logs de error de usuarios (en dos usuarios precisamente) de apache, me encontré con lo siguiente que creo debe tener relación con mi problema (lo del favicon no le den importancia Tongue):

Code:
[Thu Jun 11 01:32:39 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) started (pid 22090)
[Thu Jun 11 01:32:42 2009] [error] [client 190.245.202.172] File does not exist: /var/www/virtual/fincat.com.ar/extranet/htdocs/favicon.ico
[Thu Jun 11 01:32:45 2009] [error] [client 190.245.202.172] File does not exist: /var/www/virtual/fincat.com.ar/extranet/htdocs/favicon.ico
[Thu Jun 11 08:02:13 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) started (pid 22921)
[Thu Jun 11 08:15:59 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) started (pid 23545)
[Thu Jun 11 08:16:57 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 23545) termination signaled
[Thu Jun 11 08:16:57 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 23545) terminated by calling exit with status '0'
[Thu Jun 11 08:18:21 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 23576)
[Thu Jun 11 08:18:26 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) started (pid 23583)
[Thu Jun 11 08:18:31 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) started (pid 23589)
[Thu Jun 11 08:18:39 2009] [warn] FastCGI: scheduled the start of the last (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" process: reached dynamicMaxClassProcs (5)
[Thu Jun 11 08:18:39 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) started (pid 23592)
[Thu Jun 11 08:19:04 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 23592) termination signaled
[Thu Jun 11 08:19:04 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 23592) terminated by calling exit with status '0'
[Thu Jun 11 08:19:24 2009] [warn] FastCGI: scheduled the restart of the last (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" process: reached dynamicMaxClassProcs (5)
[Thu Jun 11 08:19:24 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 23600)
[Thu Jun 11 08:20:05 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 23600) termination signaled
[Thu Jun 11 08:20:05 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 23600) terminated by calling exit with status '0'
[Thu Jun 11 08:21:06 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 23589) termination signaled
[Thu Jun 11 08:21:07 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 23589) terminated by calling exit with status '0'
[Thu Jun 11 08:22:11 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 23583) termination signaled
[Thu Jun 11 08:22:12 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 23583) terminated by calling exit with status '0'
[Thu Jun 11 08:23:12 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 23576) termination signaled
[Thu Jun 11 08:23:12 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 23576) terminated by calling exit with status '0'
[Thu Jun 11 08:46:34 2009] [error] [client 200.117.132.50] File does not exist: /var/www/virtual/fincat.com.ar/extranet/htdocs/favicon.ico
[Thu Jun 11 08:46:37 2009] [error] [client 200.117.132.50] File does not exist: /var/www/virtual/fincat.com.ar/extranet/htdocs/favicon.ico
[Thu Jun 11 09:04:39 2009] [error] [client 190.30.96.101] File does not exist: /var/www/virtual/fincat.com.ar/extranet/htdocs/favicon.ico
[Thu Jun 11 09:05:11 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 26228)
[Thu Jun 11 09:06:09 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26228) termination signaled
[Thu Jun 11 09:06:09 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26228) terminated by calling exit with status '0'
[Thu Jun 11 09:07:46 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 26272)
[Thu Jun 11 09:08:14 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26272) termination signaled
[Thu Jun 11 09:08:14 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26272) terminated by calling exit with status '0'
[Thu Jun 11 09:08:33 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 26281)
[Thu Jun 11 09:09:15 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26281) termination signaled
[Thu Jun 11 09:09:15 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26281) terminated by calling exit with status '0'
[Thu Jun 11 09:21:59 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 26954)
[Thu Jun 11 09:22:04 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 26959)
[Thu Jun 11 09:22:10 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 26963)
[Thu Jun 11 09:22:26 2009] [warn] FastCGI: scheduled the restart of the last (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" process: reached dynamicMaxClassProcs (5)
[Thu Jun 11 09:23:27 2009] [warn] FastCGI: scheduled the restart of the last (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" process: reached dynamicMaxClassProcs (5)
[Thu Jun 11 09:23:32 2009] [warn] FastCGI: scheduled the restart of the last (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" process: reached dynamicMaxClassProcs (5)
[Thu Jun 11 09:23:32 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 26978)
[Thu Jun 11 09:24:32 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26978) termination signaled
[Thu Jun 11 09:24:32 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26978) terminated by calling exit with status '0'
[Thu Jun 11 09:25:35 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26963) termination signaled
[Thu Jun 11 09:25:35 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26963) terminated by calling exit with status '0'
[Thu Jun 11 09:26:38 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26959) termination signaled
[Thu Jun 11 09:26:38 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26959) terminated by calling exit with status '0'
[Thu Jun 11 09:27:44 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26954) termination signaled
[Thu Jun 11 09:27:44 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 26954) terminated by calling exit with status '0'
[Thu Jun 11 09:30:25 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 27642)
[Thu Jun 11 09:30:44 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27642) termination signaled
[Thu Jun 11 09:30:44 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27642) terminated by calling exit with status '0'
[Thu Jun 11 09:34:49 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 27674)
[Thu Jun 11 09:34:58 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 27682)
[Thu Jun 11 09:35:57 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27682) termination signaled
[Thu Jun 11 09:35:57 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27682) terminated by calling exit with status '0'
[Thu Jun 11 09:36:29 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 27872)
[Thu Jun 11 09:36:59 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27872) termination signaled
[Thu Jun 11 09:36:59 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27872) terminated by calling exit with status '0'
[Thu Jun 11 09:37:15 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 27881)
[Thu Jun 11 09:37:20 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 27884)
[Thu Jun 11 09:37:25 2009] [warn] FastCGI: scheduled the restart of the last (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" process: reached dynamicMaxClassProcs (5)
[Thu Jun 11 09:37:25 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 27888)
[Thu Jun 11 09:38:00 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27888) termination signaled
[Thu Jun 11 09:38:00 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27888) terminated by calling exit with status '0'
[Thu Jun 11 09:39:01 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27884) termination signaled
[Thu Jun 11 09:39:01 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27884) terminated by calling exit with status '0'
[Thu Jun 11 09:40:02 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27881) termination signaled
[Thu Jun 11 09:40:02 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27881) terminated by calling exit with status '0'
[Thu Jun 11 09:41:08 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27674) termination signaled
[Thu Jun 11 09:41:08 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27674) terminated by calling exit with status '0'
[Thu Jun 11 09:53:32 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 28549)
[Thu Jun 11 09:53:35 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 28549) termination signaled
[Thu Jun 11 09:53:35 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 28549) terminated by calling exit with status '0'
[Thu Jun 11 09:53:40 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 28557)
[Thu Jun 11 09:54:16 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 28561)
[Thu Jun 11 09:54:21 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 28567)
[Thu Jun 11 09:54:36 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 28567) termination signaled
[Thu Jun 11 09:54:36 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 28567) terminated by calling exit with status '0'
[Thu Jun 11 09:55:38 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 28561) termination signaled
[Thu Jun 11 09:55:38 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 28561) terminated by calling exit with status '0'
[Thu Jun 11 09:56:42 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 28557) termination signaled
[Thu Jun 11 09:56:42 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 28557) terminated by calling exit with status '0'
[Thu Jun 11 10:01:04 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (uid 2006, gid 2006) restarted (pid 29232)
[Thu Jun 11 10:01:55 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 29232) termination signaled
[Thu Jun 11 10:01:55 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 29232) terminated by calling exit with status '0'

Esto se repite permanentemente (y en otro usuario también). Al parecer hay algo que hace reiniciar el proceso incesantemente. Cómo puedo saber cuál es el motivo?

Muchas gracias y hasta luego!
06-12-2009 03:37 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: #12
RE: Problema con procesos php5-cgi!
Algunos restarts son normales, puesto que fastcgi no es mas que un "ejecutador de procesos php". La idea es que fastcgi ejecuta algunos procesos php y luego va distribuyendo las peticiones entre ellos. Cuando un proceso ha servido un numero x (creo que eran 100 por defecto) de peticiones, lo mata y lo vuelve a ejecutar, para evitar problemas con memory leaks y cosas por el estilo.

Dicho esto, los mensajes tipo:
Code:
[Thu Jun 11 09:36:59 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi/fincat.com.ar/php5-fcgi-starter" (pid 27872) terminated by calling exit with status '0'
suelen indicar algun problema al ejecutar el script (php fatal error -> internal server error), así que deberías repasar el combined.log para ver si hay (y cuales son) peticiones a archivos php generando errores 500, y luego mirar por qué esos php fallan (falta un archivo "required", un path esta mal, falta un módulo php, lo que sea...).

Por otra parte, el número máximo de procesos ejecutados por fastcgi, los tiempos de "timeout", etc. se configuran en /etc/apache2/mods-available/fastcgi_ispcp.conf (global) y /var/www/fcgi/dominio.tld/php5-fcgi-starter (específico del dominio, pero menos donde elegir).
06-12-2009 04:40 PM
Visit this user's website Find all posts by this user Quote this message in a reply
sercba Offline
Junior Member
*

Posts: 51
Joined: Aug 2008
Reputation: 0
Post: #13
RE: Problema con procesos php5-cgi!
kilburn!

Como siempre rescatándome. Muchas gracias por la información, es realmente muy valiosa. Ahora me pondré a ver!

Saludos!
06-13-2009 12:04 AM
Find all posts by this user Quote this message in a reply
sercba Offline
Junior Member
*

Posts: 51
Joined: Aug 2008
Reputation: 0
Post: #14
RE: Problema con procesos php5-cgi!
Hola nuevamente!

Existe alguna posibilidad de decirle a fastcgi que sólo genere un solo proceso por usuario?

Con esto podría ver con más claridad si me quedan procesos sin matar, ya que siempre tendría que haber ejecutándose uno por usuario.

Qué te parece?
06-13-2009 01:36 AM
Find all posts by this user Quote this message in a reply
sercba Offline
Junior Member
*

Posts: 51
Joined: Aug 2008
Reputation: 0
Post: #15
RE: Problema con procesos php5-cgi!
Hola amigos!

He encontrado la solución y es sólo un problema de configuración, pero lo más grave, es que deberían tenerlo todos.

Todo surgió cuando leí el siguiente párrafo (medio escondido) en la documentación de mod_fcgid (http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html).

En "Special PHP considerations" dice lo siguiente:
Quote:PHP child process management (PHP_FCGI_CHILDREN) should always be disabled with mod_fcgid, which will only route requests to application processes it has spawned. Any child processes created by PHP will be unused and may not be terminated properly. By default, and with the environment variable setting PHP_FCGI_CHILDREN=0, PHP child process management is disabled.

Y ahí entendí todo, ya que actualmente ispcp configura PHP_FCGI_CHILDREN=2, y esos son los procesos sin terminar que quedan colgados. Los puse en 0 (y volví a generar la configuración para que sea apliquen en todos los dominios) y ahora todo va bien.

Luego encontré un hombre que le pasaba lo mismo (él hizo pruebas para fundamentar la decisión):
http://wherethebitsroam.com/blogs/jeffw/...gichildren

Deberíamos informar esto como un bug para que esté solucionado en la próxima release?

Saludos!
12-18-2009 06:36 AM
Find all posts by this user Quote this message in a reply
kurgans Offline
Moderator
*****
Moderators

Posts: 1,565
Joined: Feb 2008
Reputation: 23
Post: #16
RE: Problema con procesos php5-cgi!
Ya lo sabemos, Kilburn quedo en que bueno a ver si se podia implantar en las versiones futuras, mientras tanto haciendo los cambios manuales que me paso el el servidor cambio como de la noche al dia al tener 90 - 100 procesos inactivos mientras que antes podia llegar a tener hasta 400 lo que influia bastante en el rendimiento de la maquina.

Te paso los cambios:
Archivo -> /var/www/fcgi/master# php5-fcgi-starter

#!/bin/sh

umask 022

PHPRC="/var/www/fcgi/master/php5/"

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

exec /usr/bin/php5-cgi


La config
Archivo -> /etc/apache2/mods-enabled/fcgid_ispcp.conf

<IfModule mod_fcgid.c>
AddHandler fcgid-script .php .php5
SocketPath /var/lib/apache2/fcgid/sock
IdleTimeout 600
IdleScanInterval 120
BusyTimeout 300
BusyScanInterval 120
ErrorScanInterval 3
ZombieScanInterval 3
ProcessLifeTime 3600
SpawnScoreUpLimit 10
SpawnScore 1
TerminationScore 2
MaxProcessCount 1000
DefaultMaxClassProcessCount 100
DefaultMinClassProcessCount 0
IPCConnectTimeout 20
IPCCommTimeout 600
MaxRequestsPerProcess 500
PassHeader AUTHORIZATION
</IfModule>

Estos cambios son manuales con lo cual todos los archivos php5-fcgi-starter hay que cambiarlos a mano.

Se me paso la plantilla para cuando agregues los nuevos.

Fichero -> /etc/ispcp/fcgi/parts/php5-fcgi-starter.tpl
#!/bin/sh

umask 022

PHPRC="{PHP_STARTER_DIR}/{DMN_NAME}/php5/"

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

exec {PHP5_FASTCGI_BIN}
(This post was last modified: 12-18-2009 07:05 AM by kurgans.)
12-18-2009 06:47 AM
Visit this user's website 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: #17
RE: Problema con procesos php5-cgi!
Obviamente, tienes razón en lo que dices. No obstante, esa consideración no se aplica a fastcgi (quien sí utiliza los múltiples "hijos"), así que si seguías teniendo el problema con él es raro que se te haya solucionado solo con eso.

Cuanto tiempo llevas con el cambio aplicado y sin problemas?

En cuanto a lo del bug... sí, abre un bug indicando que cuando se configure ispcp para fcgid ese valor debería ser 0 (o estar comentado, que es como lo tengo yo). De todos modos hay mucha gente que usa la configuración por defecto y no tiene problemas de procesos muertos, así que en todo caso dejalo claro en el bug (vamos, que no es algo crítico y no va a entrar en la proxima release, que es la semana que viene y por tanto esta cerrada a cambios ya).

Salud!
12-18-2009 06:51 AM
Visit this user's website Find all posts by this user Quote this message in a reply
sercba Offline
Junior Member
*

Posts: 51
Joined: Aug 2008
Reputation: 0
Post: #18
RE: Problema con procesos php5-cgi!
Hola a ambos!

Con fastcgi (con retoques en la configuración) el problema disminuía, pero me funcionaba lerdo, como que tardaban los procesos en crearse.

Luego de estar un par de meses así, con el servidor menos "cargado" pero con esta lerditud, opté por volver a fcgid a cuesta de "manualmente" alivianarlo. En seguida noté los cambios de respuesta en los sitios web, y también así en los recursos del servidor se iban por las nubes (sobre todo la ram).

Luego de modificar PHP_FCGI_CHILDREN (o comentar, ya que el defecto es 0), hice un seguimiento en ver la vida de los procesos durante un par de días, y ya fue suficiente en ver que efectivamente terminaban. Todos los procesos (php5-cgi) son del día, y no como antes que algunos quedaban colgados desde el primer día (tenían meses) y nunca morían.

La verdad no tengo mucho conocimiento en este tema, sólo encontré de casualidad ese párrafo en la documentación que iluminó mi camino ya en la oscuridad total de mucho tiempo sin solución (me pongo cursi, jaja!).

Otra cosa, sobre la gente que me dices que con la configuración por defecto no tiene problemas, será que no tiene alojadas páginas php (excepto el panel, claro). A lo mejor utilizan otro lenguaje (python, ruby, etc) o sólo html estático.

Y como kurgans dijo que ya sabían sobre el problema y la solución, no publicaré ningún bug y dejaré que los verdaderos autores lo hagan!

Un gran saludo y muchas gracias por ayudarme! Esto es lo lindo de las comunidades..., la fuerza del "entre todos" mueve montañas.
Algo que se me pasó para kurgans!

No es necesario cambiar todos los php5-fcgi-starter a mano, sólo modificando la plantilla y luego borrando los php5-fcgi-starter de cada sitio (excepto el de master, éste sino borrarlo y retocarlo a mano ya que no se regenera), luego regenerando la configuración todo queda ok.

Saludos!
(This post was last modified: 12-18-2009 07:40 AM by sercba.)
12-18-2009 07:33 AM
Find all posts by this user Quote this message in a reply
sercba Offline
Junior Member
*

Posts: 51
Joined: Aug 2008
Reputation: 0
Post: #19
RE: Problema con procesos php5-cgi!
Grata sorpresa al encontrarme que al actualizar a la última versión, al regenerar la configuración de los starters, seguimos teniendo habilitado PHP_FCGI_CHILDREN, ahora con un valor de 2, muchos procesos van a quedar sin cerrarse según indica la documentación de fcgid (y de hecho a mi me pasa, asi que los tuve que poner en 0).
03-13-2010 06:13 AM
Find all posts by this user Quote this message in a reply
kurgans Offline
Moderator
*****
Moderators

Posts: 1,565
Joined: Feb 2008
Reputation: 23
Post: #20
RE: Problema con procesos php5-cgi!
Para la proxima actualizacion una vez echo el make copia tu archivos tps tuyos asi instalara y regenera segun los datos que tengas actualmente.
03-13-2010 07:53 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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