FeaturesWP CloudPricingEE CLIContactMy Account

Features

Team Access & User Permissions

Server Setup & Management

Site Creation & Management

Deployments & Developer Tools

Firewall Protection

Speed & Caching

Backups & Recovery

Logs & Monitoring

Create WP Cloud Sites

All Features

Read Documentation

Install

Installation Guide

FAQ

Roadmap

Explore EE CLI

Resources

Commands

Handbook

Blog

Community

Forum

EasyExperts

Tutorials

Subscribe

Github

CLEAR

Start For Free

separator Tutorials separator PHP separator Generating core-dump for php5-fpm

Topics

On this page

Install Packages

Linux Changes

PHP5-FPM Config Changes

Check core dumps

Reading a backtrace

Generating core-dump for php5-fpm

Install Packages

Run following command:


			apt-get install gdb php5-dbg
		

Linux Changes

First you need to enable core dumps in linux


			su -
echo '/tmp/core-%e.%p' > /proc/sys/kernel/core_pattern
echo 0 > /proc/sys/kernel/core_uses_pid
ulimit -c unlimited
		

PHP5-FPM Config Changes

Then you need to make changes to php5-fpm config:


			vim /etc/php-fpm.d/www.conf
		

and uncomment following line


			rlimit_core = unlimited
		

Restart FPM


			service pgp5-fpm restart
		

Check core dumps

If you see in fpm error logs:


			[05-Jun-2014 06:21:12] WARNING: [pool www] child 631273 exited on signal 11 (SIGSEGV - core dumped) after 20.263546 seconds from start
		

Go to /tmp folder and you will see files like:


			# ls -l /tmp/core*
-rw------- 1 www-data www-data 133021696 Jun  5 06:05 /tmp/core-php5-fpm.630436
-rw------- 1 www-data www-data  66887680 Jun  5 06:09 /tmp/core-php5-fpm.630735
-rw------- 1 www-data www-data  66887680 Jun  5 06:11 /tmp/core-php5-fpm.630832
-rw------- 1 www-data www-data  72388608 Jun  5 06:21 /tmp/core-php5-fpm.631273
		

Reading a backtrace

Use following syntax to run gdb


			gdb /usr/sbin/php5-fpm /tmp/core-php5-fpm.630832
		

Above will show useful info about crash from dump file and open a gdb shell.

You can run bt command in it to get more detailed output.


			(gdb) bt
		

 

Directly connect to PHP-FPM

PREVIOUS

GeoIP

NEXT


Features

Useful Links

Product

Other Products

Subscribe for curated product updates, tips, and announcements.

"*" indicates required fields

Name

This field is for validation purposes and should be left unchanged.

Email*

SIGN ME UP

Δ


© rtCamp, since 2009. All rights reserved.

Powered by