LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   apache2 ulimit help (https://www.linuxquestions.org/questions/linux-server-73/apache2-ulimit-help-811478/)

tdnnash25 06-01-2010 09:28 AM

apache2 ulimit help
 
I'm trying to setup apache2 to drop a core file when it crashes. I know that you need to set the CoreDumpDirectory directive in /etc/apache2/apache2.conf and run "ulimit -c unlimited" from the command line (and restart apache after the ulimit command). But, on a reboot, even though the output of "ulimit -a" shows unlimited, apache2 will not create a core dump file unliess you set ulimit -c unlimited again and restart apache2. There must be a way to configure apache2.conf or something so that ulimit -c unlimited is set prior to apache2 starting, no?

tdnnash25 06-01-2010 10:09 AM

I changed this in /usr/sbin/apache2ctl

ULIMIT_MAX_FILES="${APACHE_ULIMIT_MAX_FILES:-ulimit -S -n `ulimit -H -n`}"

to this:

ULIMIT_MAX_FILES="${APACHE_ULIMIT_MAX_FILES:-ulimit -c unlimited `ulimit -c unlimited`}"

which did cause it to create a core dump after a reboot...but is this bad for anything else?

tdnnash25 06-01-2010 10:28 AM

this seems to work too:


ULIMIT_MAX_FILES="${APACHE_ULIMIT_MAX_FILES:-ulimit -c unlimited -S -n `ulimit -c unlimited -H -n`}"

pretty sure this isn't bad; but if anyone has any advice please advise


All times are GMT -5. The time now is 03:57 AM.