[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

problemas con el fork.



Tengo instalado linux Debian 2.4.13 con Apache 2.0.43 y Resin 2.0.2 y IBMJava2-13.
En ocasiones, cuando conecto con el servidor por ssh  e intento ejecutar algún comando obtengo el siguiente error:
sh: fork: Recurso no disponible temporalmente
Los scripts que actualizan los contenidos en el servidor fallan. Fallan también los directorios de la máquina que tengo montados por NFS en otros equipos.
Si compruebo los límites del sistema obtengo:
 
servweb: # ulimit -a
core file size (blocks) 0
data seg size (kbytes) unlimited
file size (blocks) unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) 8192
cpu time (seconds) unlimited
max user processes 256
virtual memory (kbytes) unlimited
 
El número máximo de procesos por usuario es 256.
Si programo en el cron del sistema un script que lance este mismo comando obtengo
 
core file size (blocks) 0
data seg size (kbytes) unlimited
file size (blocks) unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) 8192
cpu time (seconds) unlimited
max user processes 8190
virtual memory (kbytes) unlimited
 
Donde el número de procesos por usuario es 8190.
El único sitio donde se me ocurre configurar el número de procesos por usuario es en el .profile del home del usuario en cuestión.
El problema es que el usuario que lanza apache y resin es un usuario especial que no tiene bash en el sistema.
Sobre la configuración del apache y del resin les detallo a continuación los parámetros de la configuración que considero pueden estar relacionados con el problema:
 
Parámetros de configuración de apache:
#
# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
# It is intended mainly as a brake to keep a runaway server from taking
# the system with it as it spirals down...
#
MaxClients 1000
 
#
# MaxRequestsPerChild: the number of requests each child process is
# allowed to process before the child dies.  The child will exit so
# as to avoid problems after prolonged use when Apache (and maybe the
# libraries it uses) leak memory or other resources.  On most systems, this
# isn't really needed, but a few (such as Solaris) do have notable leaks
# in the libraries. For these platforms, set to something like 10000
# or so; a setting of 0 means unlimited.
#
# NOTE: This value does not include keepalive requests after the initial
#       request per connection. For example, if a child process handles
#       an initial request and 10 subsequent "keptalive" requests, it
#       would only count as 1 request towards this limit.
#
MaxRequestsPerChild 0
 
Apache tiene configurados cuatro hosts virtuales y resin tiene cuatro contextos independientes cada uno de ellos tiene los mismos parámetros de configuración.
 
Parámetros de configuración de resin.
    <!-- You'll need to tweak these to maximize performance -->
    <thread-min>100</thread-min>
    <thread-max>1100</thread-max>
  <!--
     - How many threads to wait for keepalives.  Should be at least the
     - number of Apache processes to get good performance.
    -->
     <thread-keepalive>1000</thread-keepalive>
 
Agradecería cualquier sugerencia sobre como solucionar este problema.
Saludos
 

Reply to: