LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-01-2010, 09:28 AM   #1
tdnnash25
Member
 
Registered: Apr 2009
Posts: 63

Rep: Reputation: 15
Question 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?
 
Old 06-01-2010, 10:09 AM   #2
tdnnash25
Member
 
Registered: Apr 2009
Posts: 63

Original Poster
Rep: Reputation: 15
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?
 
Old 06-01-2010, 10:28 AM   #3
tdnnash25
Member
 
Registered: Apr 2009
Posts: 63

Original Poster
Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Compiling my own apache2 on debian -- no /usr/sbin/apache2 ??? jippen Linux - Server 2 11-30-2009 03:21 AM
Apache2 - have to restart apache2 process every 10 mins to clear /tmp directory.... levi dehaan Linux - Software 8 09-01-2009 06:34 PM
What is ulimit and what it does? brazilian_user Linux - General 3 01-30-2007 01:39 PM
ulimit introuble Linux - Security 1 07-22-2006 03:33 AM
SuSe Apache2 error: cannot adjust 'apache2' service sir_shunt SUSE / openSUSE 14 04-18-2006 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration