Configuration mod fcgid for large process & Large Site

7.3k Views Asked by At

I need some advice from an expert apache fcgid, the best settings for fcgid to be able to handle large process and long php process.

Kvm Vps

6GB Ram

4 Cpu Core

Centos 7 x64

Apache 2.4.6

Php 7

The current configuration on /etc/httpd/conf.d/fcgid.conf

# This is the Apache server configuration file for providing FastCGI support
# through mod_fcgid
#
# Documentation is available at
# http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

# 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
FcgidMinProcessesPerClass  0
FcgidMaxProcessesPerClass  8
FcgidMaxProcesses          100
FcgidIdleTimeout           60
FcgidProcessLifeTime       120
FcgidIdleScanInterval      10

Tanks very much...

1

There are 1 best solutions below

3
Bogdan Stoica On

This is my config from a cPanel/WHm server with about 350 cPanel active accounts (sites/domains/emails etc).

The sever is a vmware VM with 8 cpu cores, 8 GB RAM, 6 GB swap

<IfModule mod_fcgid.c>
    FcgidMaxRequestLen 1073741824
    FcgidOutputBufferSize 1073741824
</IfModule>
<IfModule mod_fcgid.c>
      FcgidMaxRequestsPerProcess 500
      FcgidMaxProcesses 300
      FcgidConnectTimeout 180
      FcgidIOTimeout 2000
      FcgidIdleTimeout 60
      FcgidFixPathinfo 1
      FcgidProcessLifeTime 60
      FcgidIdleScanInterval 15
      FcgidBusyTimeout 180
      FcgidBusyScanInterval 30
      FcgidErrorScanInterval 3
      FcgidZombieScanInterval 3
      FcgidMinProcessesPerClass  0
      #FcgidMaxProcessesPerClass 3
</IfModule>

The server works perfectly fine!