• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Plesk, fcgi memory problems (leak?)

argonius

Basic Pleskian
Hi,

we are running ~100 Domains on a Intel I7 CPU with 8GB of ram.
After startup, the system has ~5GB of free ram. After a while, linux is taking much of them
for caching, which is normal.

Our domains are running with php in fcgi mode.

After a while (~ 8h) I can see huge memory consumption from apache processes and many many
old php processes.
I played around with serveral fcgid.conf parameters, but without success.
It seems that sometimes idle fcgi processes won't be killed :(

here is my fcgid.conf:

# added by psa-mod-fcgid-configurator
LoadModule fcgid_module /usr/lib64/httpd/modules/mod_fcgid.so

<IfModule mod_fcgid.c>
SocketPath /var/lib/httpd/fcgid/sock
</IfModule>

# added by psa-mod-fcgid-configurator
<IfModule mod_fcgid.c>
IdleTimeout 600
IdleScanInterval 240
BusyTimeout 300
BusyScanInterval 120
ErrorScanInterval 6
ZombieScanInterval 6
ProcessLifeTime 3600
SpawnScoreUpLimit 10
SpawnScore 1
TerminationScore 2
MaxProcessCount 250
DefaultMaxClassProcessCount 10
DefaultMinClassProcessCount 0
IPCConnectTimeout 30
IPCCommTimeout 45
DefaultInitEnv RAILS_ENV production
</IfModule>



Here are my settings for mpm_prefork (have to use prefork, cause
webmail and others need mod_php ...)

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>



I think, these value are acceptable.

Does fcgid from psa has a memleak or something? Or has anybody a clue, how to get
rid of old fcgi processes which aren't in use (i'd strace'd them)

I am very thankful for any idea/help/guess ....


Thanks,
patrick
 
add new directivee in fcgid.conf

<IfModule mod_fcgid.c>
..
FcgidIdleTimeout 40
FcgidProcessLifeTime 30
FcgidMaxProcesses 20
FcgidMaxProcessesPerClass 8
FcgidConnectTimeout 30
FcgidIOTimeout 45
FcgidInitialEnv RAILS_ENV production
FcgidIdleScanInterval 10
FcgidMinProcessesPerClass 0 <<<<<<< without it timeouts are dummy
..
</IfModule mod_fcgid.c>
 
Back
Top