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
6
votes
1 answer

docker-compose exec composer as user

I have a docker-compose setup working perfect on my local machine for my symfony projects with nginx, php7-fpm and mysql. I often need to install new packages via composer, so I just deliver the command to my php-fpm container like…
sh4
  • 241
  • 1
  • 3
  • 7
6
votes
1 answer

Stop reusing PHP_VALUE for different sites with PHP-FPM

I noticed the following behavior or PHP-FPM: Take a look at these two Nginx configs: server { listen 80; server_name example.com; location / { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME …
Oleg
  • 276
  • 4
  • 18
6
votes
1 answer

Nginx + PHP maximum output limit

I have php 5.5 (fpm) and nginx 1.10 installed (gzip configured to 1). Running on ubuntu. When I am "echoing" a large output (over 2 mb), it stops abruptly at around 520 kb. But same program when I run on php-cli, it has no problem "echoing" the…
hakacadera
  • 61
  • 2
6
votes
1 answer

Maximum php-fpm threads per one core

I would like to ask how to get the best (maximum) number of php-fpm threads per one core? How to benchmark it (on linux/debian)? And how to recognize that this count is already too much? Thank you.
thorewi
  • 63
  • 1
  • 3
6
votes
2 answers

Start PHP-FPM with root option automatically

I was trying to get PHP-FPM running a pool as root, but I can't seem to adjust the init.d startup params. It works when starting PHP-FPM from the CLI (with sudo php-fpm7.0 -DRy /etc/php/7.0/fpm/php-fpm.conf, but I can't get this to work with the…
redelschaap
  • 235
  • 1
  • 3
  • 14
6
votes
3 answers

Nginx & PHP in a subdirectory

I have an app behind nginx. But i need a specific path in this app redirect to a Wordpress Blog Example : example.com/ -------> Redirect to my app example.com/whatever/ -------> Redirect to my app too example.com/blog/ ------->Redirect to my…
Varkal
  • 163
  • 1
  • 1
  • 6
6
votes
0 answers

How do I allow users to override X-Frame-Options when using Apache + PHP-FPM?

I have an Ubuntu 14.04 server running Apache + PHP-FPM + FastCGI, serving user home pages. For security, I have enabled in Apache's configuration: Header set X-Content-Type-Options: "nosniff" Header set X-Frame-Options: "sameorigin" Header set…
muru
  • 589
  • 8
  • 26
6
votes
3 answers

How can I trace the cause of php-fpm terminating?

I have VPS (4 core, 6GB) running centos, nginx and php-fpm, with very little traffic (I have never published the url). Every few weeks (at different times), php-fpm terminates with only the following in php-fpm.log: [10-Nov-2015 04:14:48] NOTICE:…
Paul S
  • 161
  • 1
  • 5
6
votes
1 answer

nginx and php-fpm "Primary script unknown"

Smells like a duplicate, I know, but I have now tried this Setup 5 Times over, and still I can't get this to work. Most of the configs are complicated with chroot and multi servers etc., but I have reduced this now to the simplest config possible. I…
Adesso
  • 203
  • 1
  • 3
  • 10
6
votes
1 answer

Nginx and different versions of PHP FPM + PHP

Due to a better understanding of what I wish to achieve thanks to Mark and his previous answer, I am posting a (hopefully) clearer and slightly different variation of my previous question as that thread has reached saturation; I am trying to have…
myol
  • 181
  • 2
  • 2
  • 12
6
votes
1 answer

nginx & php-fpm [debug] 11: Resource temporarily unavailable

New Development The core php error logs are below, but the site specific error logs show this. The memory on my php.ini file is : memory_size 1024; so it's not php's memory limit. I've also disabled all my plugin's, so it's not the memory limit that…
Thomas
  • 61
  • 1
  • 4
6
votes
1 answer

Cannot connect to PostgreSQL unix domain socket

I'm trying to connect to PostgreSQL Unix domain socket from a PHP web application. Relevant system components: CentOS 7 x64 (SELinux enforced) postgresql93 9.3.5-2PGDG.rhel7 nginx 1.6.2-1.el7.ngx php-common 5.4.16-23.el7_0.3 php-fpm…
Sergii Bogomolov
  • 261
  • 1
  • 2
  • 7
6
votes
2 answers

Odd performance fluctation with php-fpm and nginx

I'm running a load test against a web service. It's a php application running on php-fpm and nginx, with fastcgi. There is a MySQL backend being used for small reads only. Invariably, I'm seeing a peculiar pattern: performance is steady and…
Cera
  • 553
  • 4
  • 6
  • 13
6
votes
0 answers

Apache + Php-FPM + APC : mode_deflate not compressing HTML output

I have prepared a server to run a Magento instance with: Apache + Php-FPM + APC The problem I have is that Apache is not compressing the HTML output from the Magento PHP scripts. In my .htaccess I have: AddOutputFilterByType DEFLATE text/html…
Ox3
  • 161
  • 4
6
votes
2 answers

Nothing is written in php5-fpm.log

I have two servers which is Ubuntu 12.04 and Ubuntu 14.04. When I use Ubuntu 14.04 in my new server and enabled the php-fpm log file found under /etc/php5/fpm/php-fpm.conf that reads as follows: error_log = /var/log/php5-fpm.log I noticed that most…
jaypabs
  • 823
  • 2
  • 10
  • 15