2

On server, I run Apache via FastCGI using PHP 7.4.13:

/etc/httpd/conf.d/ is configured as this:

# Use FastCGI to process .fcg .fcgi & .fpl scripts
AddHandler fcgid-script fcg fcgi fpl

# Sane place to put sockets and shared memory file
FcgidIPCDir /run/mod_fcgid
FcgidProcessTableFile /run/mod_fcgid/fcgid_shm

FcgidMaxRequestLen 33554432
FcgidIOTimeout 3600
FcgidBusyTimeout 3600

FcgidConnectTimeout 300
FcgidMaxRequestsPerProcess 500

FcgidMaxProcesses 10000
FcgidMaxProcessesPerClass 5000

However, approximatelly every 6 hours, the server "crashes" (FTP is working, static content from subdomain is working, SSH is working) and error log is full of

mod_fcgid: can't apply process slot for /var/www/php-bin/domain/php

The server resources are free during this: htop Tasks is around 600, I have 190GB RAM (60GB is taken) and 40 cores (all under 5% according to htop), so there is plenty of power but server is not responding and returns 500-family error. After reset all is back to normal.

There seems to be no "weird" activity according to Apache access log. I currently run rsync (copying milions of small files) in low priority mode to backup my disc and this problem starts masivelly recently, when I started rsync. I am not sure if it is related problem or not, but I cannot quit rsync.

Martin Perry
  • 121
  • 3

0 Answers0