Questions tagged [fpm]

FastCGI Process Manager - an alternative PHP FastCGI implementation with some additional features

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

More information can be found on http://php-fpm.org.

503 questions
8
votes
1 answer

php-fpm container livenessProbe with /ping route

Lately we've been running into some issues with our php-fpm processes spinning out of control and causing the site to become unresponsive. There's some obvious php-fpm configuration tooling that needs to be done, but I'd also like to implement a…
erstaples
  • 1,986
  • 16
  • 31
8
votes
2 answers

Allow users to reload PHP FPM without Sudo

On our development servers, we allow multiple developers access to the server to git pull their changes. Normally this requires running sudo systemctl reload php-fpm (or sending USR2, etc.). However, we want to allow them to reload the changed code…
Moshe Katz
  • 15,992
  • 7
  • 69
  • 116
8
votes
3 answers

how to set max_execution_time php-fpm docker image?

I am using docker image for php5.6-fpm from https://hub.docker.com/_/php/. When I check php.ini location in phpinfo() it says it is /usr/local/etc/php, but when I look into that path there is no php.ini located there. Now I want to change…
user7399816
7
votes
4 answers

Make PHP7 and PHP 8 live together

Make PHP7 and PHP 8 live together I've upgraded from PHP 7 to PHP 8. As it's usually the case with PHP, I still have php7.4 in /usr/bin (alongside with php8.0). But, when I run the php -v command, it answers php8.0. Since then, when trying to…
Zlotz
  • 147
  • 1
  • 2
  • 12
7
votes
2 answers

Execute PHP script after php-fpm master process is restarted

Say I have a script to populate the PHP APC cache when PHP is restarted, the cache is empty. Is it possible to create a mechanism to autorun some kind of script when the master php-fpm process is started?
Ryan
  • 10,041
  • 27
  • 91
  • 156
7
votes
1 answer

How does one enable the OCI8 PHP extension, using the Oracle Instant Client, in Ubuntu 18.04 LTS with PHP-FPM and NGINX?

I'm using the latest PHP packages available from https://launchpad.net/~ondrej/+archive/ubuntu/php . When I build and install the OCI8 extension, everything appears to be in order, but despite enabling the extension in the PHP-FPM configuration, its…
Ben Johnson
  • 2,507
  • 3
  • 29
  • 29
7
votes
2 answers

How to change the format of PHP-FPM error log?

probably a pretty simple question but how do I change the log format for FPM logs? An Entry looks like this for im in stderr: 2017/12/12 10:59:09 [error] 17#17: *6 FastCGI sent in stderr: "PHP message: 2017-12-12 11:59:09 > WARNING > WarningId: 1234…
Materno
  • 343
  • 8
  • 20
7
votes
2 answers

Wrong SCRIPT_FILENAME & PHP_SELF in Apache 2.4.26

With Apache 2.4.26 using php-fpm 7.1.6, $_SERVER['SCRIPT_FILENAME'] (and $_SERVER['PHP_SELF']) is incorrect on a folder: Apache 2.4.26: /index.php Apache 2.4.25: /myfolder/index.php What is wrong?
neoteknic
  • 1,930
  • 16
  • 32
6
votes
2 answers

Does it make sense to run more PHP-FPM children than number of CPU cores?

Assuming that I have a CPU with 4 cores and 4 threads, does it make sense to run e.g. 8 PHP-FPM workers by setting pm.max_children = 8 option? As far as I'm concerned, CPU with 4 threads can only run up to 4 processes in "real" parallel. Wouldn't it…
Artur
  • 73
  • 1
  • 4
6
votes
2 answers

where to set max_post_size in the php:fpm docker image

A php application executing inside a docker container docker run -d -v "./app:/app" php:fpm complains that the default value of post_max_size (8MB) is too small and I should increase it to 32MB. Problem is, there is no php.ini in that docker…
Ludwig Schulze
  • 2,155
  • 1
  • 17
  • 36
6
votes
1 answer

What are idle processes in php-fpm?

I'm using nginx with php-fpm at Centos. Whenever I check service php-fpm status I get idle processes count 30+. When I see it in detail using service php-fpm status -l, I see some processes which were thrown as exceptions. I'm curious to know what…
Pankaj Garg
  • 1,272
  • 15
  • 21
6
votes
3 answers

php5-fpm.sock not found / created in /var/run

I fail to connect to php5-fpm.sock. I have tried many solutions but still getting this error: 2017/11/20 11:17:21 [crit] 9670#9670: *1 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream,…
Ruben
  • 1,065
  • 5
  • 18
  • 44
6
votes
3 answers

Use PHP sendmail from Docker container to send through host Postfix

I want to send mail from my Alpine-PHP-Fpm container using my host postfix installation. RECAP PHP-Fpm Container -> Sendmail -> PostFix on host -> Sending via SMTP But I get sendmail: can't connect to remote host (127.0.0.1): Connection…
javal88
  • 1,188
  • 3
  • 17
  • 29
6
votes
1 answer

php-fpm Connection reset by peer

I'm trying to get php-fpm set up on a Docker image. Here's the service in my docker-compose.yml: wordpress-service: build: context: . dockerfile: Dockerfile-wordpress image: riffsy-web-wordpress:latest restart: always links: -…
Seán Hayes
  • 4,060
  • 4
  • 33
  • 48
5
votes
0 answers

What causing this error proxy_fcgi:error] AH01071: Got error 'Primary script unknown'

I'm getting the proxy_fcgi:error] AH01071: Got error 'Primary script unknown' error very frequently. Can anyone tell me what causing this error. What I learned so far is Rewrite rule may cause this issue. But do not understand exactly what causing…
Alex
  • 996
  • 2
  • 10
  • 17
1
2
3
33 34