Nginx, PHP FPM segfault and crash

I just had a root server with Nginx, PHP and PostgreSQL set up and came across some difficulties.

So I can save other tedious troubleshooting I share here with my solution.

Here is my Server Setup

Server: Server VRoot
Operating system: Ubuntu LTS 14:04

Installation Requirements:
Nginx, PHP, PostgreSQL

Installing Nginx went smoothly and I have also received the welcome screen. After that I started the packages necessary to install PHP. Also seemed to work and I could call a simple phpinfo script, but then when I wanted to AsgardCms based on laravel hochlud and call it, I got a 502 Gateway Error. So I went to the Troubleshooting and searched all error logs.

With the call of dmesg I received the following message:

[18710.693648] php5-fpm[14673]: segfault at 2c ip 00000000006e00ba sp 00007ffc23f14660 error 4 in php5-fpm[400000+7a5000]
[18712.179472] traps: php5-fpm[14674] general protection ip:6e00c1 sp:7ffc23f14660 error:0 in php5-fpm[400000+7a5000]

In addition, in kernel.log the entry “php5-fpm crashed” was listed.

After college long try multiple instructions from different forums, I finally stumbled upon the correct solution for me: XCache and Opcache were both activated and caused a conflict. I have no clue why both were activated from the outset to me since it is a fresh install (or is that really so by default?).

The solution is therefore simply one of the two caches to disable. Because from my point of view is clear Opcache better and faster, I have deactivated the XCache. Then you just need to remove the symlink under /etc/php5/fpm/conf.d/ 20-xcache.ini.

If someone xcache preferred, then he can simply disable in php.ini opcache, simply set the entry opcache.enable = 1 on opcache.enable = 0

Useful products for server installations:

Installing Linux, Nginx, MySQL, PHP

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04

Installing Potgres (Nginx and Gunicorn)

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-django-with-postgres-nginx-and-gunicorn

About This Author

Post A Reply

*