Questions tagged [php-fpm]

PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites.

PHP-FPM provides a number of useful features over the traditional FastCGI php implementation. It is implemented as a daemon that controls one or more PHP process 'pools' which can be independently configured. Main configuration options for each pool include:

  • Socket on which requests are received (either local or TCP)
  • Separate php.ini settings for specific application requirements
  • Dynamic process control. FPM can dynamically change the number of worker processes depending on pool load.
  • Uid/gid for the pool workers
  • In-flight configuration updates - a change to the pool configuration will be rolled out gracefully across all pool workers without losing connections.
2118 questions
14
votes
1 answer

PHP-FPM's chroot and chdir directory

I am setting up php-fpm with chrooting enabled. Now I see that there are two options, and I want to know what the exact difference is. The setup has: chroot = /var/www/domains/domain.tld/ ; Chdir to this directory at the start. This value must be an…
Saif Bechan
  • 10,960
  • 10
  • 42
  • 63
14
votes
5 answers

Nginx/PHP-FPM long log lines get truncated

I am unsure is that is a Nginx or PHP-FPM setting, but long log lines are getting truncated. Is there a setting to increase the max log line length?
Jason Christa
  • 622
  • 4
  • 11
  • 21
13
votes
4 answers

Php-Fpm 7 server reached pm.max_children

I am receiving this error message when I run an intensive job in Wordpress: [pool www] server reached pm.max_children setting (5), consider raising it Using Php-fpm 7 + Nginx on 2GB RAM Server. When I run: ps aux | grep fpm root 1508 0.0 …
JoaMika
  • 499
  • 2
  • 9
  • 21
13
votes
1 answer

Domain redirects to wrong site in nginx, multiple sites in config files

I have 2 websites setup on nginx, and the correct one should load depending on which domain is accessed. For example: website1.com website2.com However, when accessing either of these domains, they both load website1.com. What's wrong with my…
Mark Gladstone
  • 155
  • 1
  • 2
  • 6
13
votes
2 answers

php-fpm: hundreds of seconds in the log

I have nginx+php-fpm web server So I've noticed in php5-fpm.log many strange lines: [03-Sep-2013 09:25:23] NOTICE: [pool www] child 23999 exited with code 0 after 321.832329 seconds from start [03-Sep-2013 09:25:23] NOTICE: [pool www] child 24082…
Lari13
  • 285
  • 1
  • 3
  • 8
13
votes
2 answers

How to set 644 permission on php-fpm log file?

The FPM log file located in /var/log/php-fpm.log has permissions rw------- (600). Other log files have rw-r--r--. How can I configure the file permission to 644?
Rohit
  • 310
  • 3
  • 7
13
votes
6 answers

Why are the PHP files downloaded instead of processed by Nginx?

I have seen the same problem, and many resolutions for it pointing to adding the type handler, but that was for Apache. I am using Arch Linux, Nginx, PHP and PHP-FMP and I cannot figure out why php files are downloading instead of running. Here is…
Shane Grant
  • 305
  • 1
  • 3
  • 12
12
votes
2 answers

Is it possible to serve static html from php-fpm?

I've dockerised a wordpress application, now I'm being a purist and don't want to include nginx in the docker container and don't want to share any state between the nginx container and php-fpm container. I want to run php-fpm as a standalone…
Martinffx
  • 277
  • 3
  • 5
12
votes
5 answers

Docker - scaling nginx and php-fpm seperately

I've been playing around with docker and docker-compose and have a question. Currently my docker-compose.yml looks like this: app: image: myname/php-app volumes: - /var/www environment: : dev web: …
JimBlizz
  • 145
  • 1
  • 1
  • 7
12
votes
4 answers

different php.ini settings for various virtualhost (php-fpm)

I searched allot here on serverFault and found this solution... Including this in virtual host should work: php_admin_flag register_argc_argv = On php_value max_execution_time = 1000 php_value session.gc_maxlifetime = 15000 php_admin_flag…
user113400
12
votes
6 answers

PHP FPM gives permission denied?

I read several entries on why PHP-FPM might give me permission denied but I can not solve it. The error logs read like: 2013/04/20 23:33:28 [crit] 15479#0: *6 open() "/var/lib/nginx/tmp/fastcgi /2/00/0000000002" failed (13: Permission denied)…
edelwater
  • 487
  • 1
  • 4
  • 12
11
votes
4 answers

Too many open files (CentOS7) - already tried setting higher limits

First time setting up a VPS – being mindful not to ask here unless I done due diligence and provide context. On my remote VPS, through the terminal, almost all commands I run end up with an Error: Too many open files message and I need your help to…
Henrik Söderlund
  • 231
  • 1
  • 2
  • 8
11
votes
2 answers

Getting environment variables in PHP-FPM with Nginx

I've defined some environment variables like APP_ENV in my /etc/environment file, on my ArchLinux. If I type printenv, I see them. I've created this simple test file called… test.php
chindit
  • 205
  • 1
  • 2
  • 3
11
votes
1 answer

blank page example.com/phpmyadmin with errors in browser's console

I have installed phpmyadmin and symlinked it on my LEMP server(php 7).But when i goto hostname/phpmyadmin it returns a blank page with phpmyadmin icon on titlebar. And 3 errors in browser's console: Failed to load resource:…
YaSh Chaudhary
  • 215
  • 2
  • 8
11
votes
2 answers

How can I create separate configuration files for php (cli) and php-fpm on an arch linux

Is it possible to create separate php.ini files for php (cli) and php-fpm, like it is possible on debian and ubuntu with two folders /etc/php/7.0/cli and /etc/php/7.0/fpm? I will be also cool if I can load independent modules with a conf.d directory…
Fiete
  • 331
  • 2
  • 9