When using Sugar CRM under mod-fcgid, we encounter a problem after a few days 
of running. The error logged by httpd is:

[Tue Jun 09 09:32:33.423239 2015] [fcgid:warn] [pid 5202:tid 140367450076928] 
(20014)Internal error: [client 75.147.140.126:51111] mod_fcgid: can't get tmp 
dir, referer: 
http://crm.ourdomain.com/index.php?module=Accounts&action=DetailView&record=7c77ce81-a854-7b8e-65d0-52fd384deacq

So, when this occurs, it keeps occurring forever until we restart httpd. It 
will then work for 2-5 days, and, then happen again. Once it starts happening, 
all users are affected, same mod_fcgid process or not. Only a restart of httpd 
seems to matter to clear it.

This appears to be triggered in the mod_fcgid code:

  641                     rv = apr_temp_dir_get(&tempdir, r->pool);
  642                     if (rv != APR_SUCCESS) {
  643                         ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r,
  644                                       "mod_fcgid: can't get tmp dir");
  645                         return HTTP_INTERNAL_SERVER_ERROR;
  646                     }

A df -h shows:

Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/VGLSI-root      30G  6.7G   23G  23% /
devtmpfs                    32G     0   32G   0% /dev
tmpfs                       32G     0   32G   0% /dev/shm
tmpfs                       32G   50M   32G   1% /run
tmpfs                       32G     0   32G   0% /sys/fs/cgroup
/dev/sda2                  497M  207M  290M  42% /boot
/dev/mapper/VGLSI-solr      63G   11G   53G  17% /solr
/dev/mapper/VGLSI-backups   50G  245M   50G   1% /backups
/dev/mapper/VGLSI-home     1.5T  944G  521G  65% /home
/dev/mapper/VGLSI-var      489G  184G  305G  38% /var

Apache status shows:
mod_fcgid status:

Total FastCGI processes: 3
Process: php5.fcgi  (/home/crm/fcgi-bin/php5.fcgi)
Pid     Active  Idle    Accesses        State
11573   2174    60      79      Ready
11574   2174    49      72      Ready
10713   2900    12      165     Ready

/tmp used to be on its own filesystem, on the off chance that has an effect, we 
removed it to use root filesystem. No impact. Even if at the instant in time 
the root filesystem was full, and it isn’t, it happens forever until we restart 
Apache. Once it starts, all Sugar file uploads fail. 

I know that mod_fcgid obtains it’s temp dir when a file is larger than some 
threshold, a value set. Ours is default value, whatever that is. I am not sure 
where this can be tuned, anyone know? Is it perhaps FcgidMaxRequestInMem? What 
is the impact to the system if I change this to say 100MB? Will each process 
consume that much more memory, or, is the memory freed? If I can increase it to 
larger than anyone ever uploads, seems like I might avoid the problem as long 
as I don’t lose all the memory permanently so to speak.

Here’s our mod_fcgid config:

FcgidIPCDir /run/mod_fcgid
FcgidProcessTableFile /run/mod_fcgid/fcgid_shm
FcgidMaxRequestsPerProcess 500
FcgidMaxProcesses 100
FcgidMinProcessesPerClass 0
FcgidIOTimeout 121
FcgidIdleTimeout 600
FcgidErrorScanInterval 10
FcgidFixPathinfo 1

mod_fcgid version is Centos 7 standard 2.3.9 with Apache 2.4.6 as we use the 
standard repository. The application used to be running on Centos 6 without 
issue. That uses Apache 2.2.15 and mod_fcgid 2.3.7

Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to