2

I'm running PHP handler fcgid

LoadModule fcgid_module modules/mod_fcgid.so
FcgidMaxRequestsPerProcess 3000
FcgidMaxProcesses 3000
FcgidMaxProcessesPerClass 16
FcgidMinProcessesPerClass 1
FcgidProcessLifeTime 7200
FcgidIOTimeout 180
IPCConnectTimeout 60
FcgidIdleTimeout 600
FcgidIdleScanInterval 30
FcgidBusyTimeout 3600
FcgidBusyScanInterval 30
FcgidErrorScanInterval 3
FcgidZombieScanInterval 3
FcgidFixPathinfo 0
FcgidMaxRequestInMem 419430400
FcgidMaxRequestLen 1073741824

The processes is terminated every 10 mintues or more, Also i set FcgidProcessLifeTime 7200

I'm using mpm_worker as well :

Timeout 50    
<IfModule worker.c>
      StartServers          16
      ServerLimit           1800
      MaxClients            1728
      MinSpareThreads       75
      MaxSpareThreads       250
      ThreadLimit          600
      ThreadsPerChild       64
      MaxRequestsPerChild   10000
      KeepAlive             On
      MaxKeepAliveRequests  50
      KeepAliveTimeout      5
    </IfModule>

Processor : Dual Intel xeon E5630 ,RAM : 32GB DDR3, PHPv5.3.14

How can i solve this problem .? and keep the process life time.

2 Answers 2

1

This is a very old question but recently had to address this.

You have FcgidIdleTimeout 600.

This means if a process is idle for 10 minutes it will be terminated regardless of what you set in FcgidProcessLifeTime.

I've not tested this but if you wanted to confirm you could set FcgidMaxProcessesPerClass 1 and then send requests every 5 minutes. This should keep this process around for FcgidProcessLifeTime because it would never be idle for FcgidIdleTimeout.

So an optimized configuration will depend on your work load.

0

I would recommend switching to php-fpm with mod_fastcgi or mod_proxy_fcgi (requires Aapache 2.4). PHP-FPM does it's own process managing and you can even choose different process managers suitable for your site.

php-fpm becomes more and more the standard way to deploy php apps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .