Difference between revisions of "Enable Apache to Create Core Dumps"

From Brian Nelson Ramblings
Jump to: navigation, search
(Created page with "==Configure Apache for core dump on Segmentation Faults== While trying to debug a 500 error the other day, I noticed that it was giving me a Segmentation fault. > 26619 15:4...")
 
(How to read the Apache web server core dumps =)
Line 38: Line 38:
 
How do I read the core dump files created by Apache on Linux systems?
 
How do I read the core dump files created by Apache on Linux systems?
  
==How to read the Apache web server core dumps ===
+
===How to read the Apache web server core dumps ===
  
 
Well I am not a developer but they are using gdb and other techniques to analyses the core dumps. Read man page of gdb for more information.
 
Well I am not a developer but they are using gdb and other techniques to analyses the core dumps. Read man page of gdb for more information.
Line 45: Line 45:
  
 
Additional Articles:
 
Additional Articles:
*
+
* [[Check the Version of Package]]
 +
* [[How to install Sphinx on Centos Server]]
 +
* [[How to install Redis on a Centos 6.4 Server]

Revision as of 05:59, 16 November 2013

Configure Apache for core dump on Segmentation Faults

While trying to debug a 500 error the other day, I noticed that it was giving me a Segmentation fault.

> 26619 15:44:43 --- SIGSEGV (Segmentation fault) @ 0 (0) ---

To get rid of this problem I was asked to configure a Linux system so that Apache can dump core files on segmentation faults.

Enable Apache Core Dump

Now Apache does support the CoreDumpDirectory directive, so our first stop is adding this to httpd.conf file.

Open httpd.conf

vim /etc/httpd/conf/httpd.conf

Add the following line to the Main Configuration Section:

CoreDumpDirectory /tmp/core-dump

Now lets create this directory if its not already there

mkdir -p /tmp/core-dump

Set permissions on the folder so Apache can write to it.

chmod 0777 /tmp/core-dump

You will also want to add the following to your Apache init script

vim /etc/init.d/httpd

Add the following to the top of the script

ulimit -c unlimited

Now we just need to restart Apache web server:

/etc/init.d/httpd restart

How do I read the core dump files created by Apache on Linux systems?

How to read the Apache web server core dumps

Well I am not a developer but they are using gdb and other techniques to analyses the core dumps. Read man page of gdb for more information.

gdb apache2 –core /path/to/corefile

Additional Articles: