Re: Re: mod_fcgid random freeze

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 16, 2013 at 8:37 AM, <krichy@xxxxxxxxxx> wrote:
Dear users,

Finally, I think I've found the problem. On freebsd, devel/apr1 chooses apr lock method as flock. Thus,
a file is used for synchronization purposes. mod_fcgid creates a temporary file in fcgid_mutex_create() using tmpnam(), which effectively creates a temporary file in /tmp. And in my freebsd setup, I've enabled /tmp cleaning as well, which removes the lock files after a fix amount of time. As apache/apr only opens the file for writing, but actually not writing anything to it, the files {a,c,m}time parameters dont change, so the /tmp cleaning process cannot detect if the files are still in use, it simply removes them.

Either mod_fcgid should use a file located elsewhere, or be configurable, or maybe apr could choose another lock method on freebsd. As on a gnu system, it chooses systemv semaphores, as I've noticed.

Please comment my investigation.

* Good investigation!
* There is good configurability of this mutex (and anything in bundled httpd modules) using the Mutex directive if you use mod_fcgid with httpd 2.4.
* Perhaps "/tmp cleaning" is broken if it removes files that processes are holding open.  Try following that thread.
* As you probably already found, you can patch fcgid_mutex_unix.c to change "apr_lockmech_e mechanism = APR_LOCK_DEFAULT;" to set it to some other mutex type (see http://apr.apache.org/docs/apr/1.4/group__apr__proc__mutex.html; probably not all of the choices will work).
** Maybe the FreeBSD package maintainer would find that appropriate.
* You can file a bug at http://issues.apache.org/bugzilla/.  I'm not aware of other people reporting mutex problems, so personally I'm not sure it is justified to make mod_fcgid's mutex configurable with httpd 2.2, except perhaps with a compile-time definition.
** But other developers may have a different opinion, so file the bug.


Regards,


2013-11-04 18:08 időpontban Richard Kojedzinszky ezt írta:

Dear Users,

I am having issues when installing mod_fcgid under freebsd. I have
installed www/apache22 from ports, as well as www/mod_fcgid. After
some days of running, many of this error message appeared in
httpd-error.log:

[Sat Nov 02 09:49:28 2013] [emerg] (2)No such file or directory:
mod_fcgid: apr_global_mutex_child_init error

And after hours passed, the entire httpd process stopped working. Only
two httpd processes left running, but they were not accepting
connections. I had to restart apache, then it worked again.

I am using prefork mpm, and have set MaxRequestsPerChild to a non-zero value.

Unfortunately, right now I cannot reproduce the problem, unfortunately
it arises randomly.

Because I did not find any useful regarding this on the web, I am
requesting help here. What could I do to investigate the problem?

Thanks in advance,
Kojedzinszky Richard

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




--
Born in Roswell... married an alien...
http://emptyhammock.com/

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux