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.

Filter by
Sorted by
Tagged with
2 votes
0 answers
2k views

Upstream prematurely closed FastCGI stdout while reading response header from

I have a setup of nginx1.20.1 + php7.3.3 on Centos7. We run those VMs beneath google cloud load balancer. Sometimes, randomly there is 502 returned to the end client. I traced one of those error ...
Tim's user avatar
  • 41
1 vote
0 answers
361 views

Why are my 2 sites on the same server (randomly?) switching PHP versions with PHP-FPM

My issue is as follows: 1 server running Debian 11 in a virtual machine (though I've tested with 9 and 10 and they both show the same behaviour) with 2 websites both configured to run with php-fpm &...
Oceanic_Panda's user avatar
1 vote
1 answer
5k views

How to install php-mysql, php-gd and other libraries on Oracle Linux

I am trying to install following libraries on Oracle Linux 8 but not working. On Debian 11 after installing php8.1-fpm I run following command and it works. sudo apt install php8.1-mysql php8.1-gd ...
Frank Martin's user avatar
0 votes
1 answer
629 views

unable to proxy pass to NGINX server running php spf

I have a main NGINX server to run certs for all my internal servers. I am adding an endpoint for a new NGINX server running php. If I connect directly to the new server the new server works correctly. ...
grandpa_sam's user avatar
0 votes
1 answer
3k views

PHP FPM cycles causing huge RAM consumption

A couple of ubuntu servers, using php8.0 / php8.1, with NGINX as a webserver, causing the problem, that my memory is filling up - based on the incoming traffic (req/s), so i have to restart the fpm ...
Tyralcori's user avatar
  • 125
0 votes
0 answers
239 views

New server Apache 2.4 + PHP responds very slowly

a customer asked to migrate their current server with plesk to a HA infrastructure. I've created the structure with haproxy and apache 2.4, but i can see many requests take a looooong time (some of ...
Nando's user avatar
  • 1
0 votes
2 answers
4k views

Connection issue with nginx and php-fpm on ubuntu 22.04 LTS

I am not able to contact my website which has been set up on a freshly installed ubuntu server 22.04 LTS. Unfortunately, my connection attempts time out with error 522 and I have no idea where to ...
Roadrunner85's user avatar
1 vote
0 answers
829 views

PHP-FPM - Debian <> Apache - 504 Gateway Timeout Error

After switching to PHP-FPM with MPM Event, there are always 504 Gateway Timeout Errors. Apache no longer answers requests. Instead there is a connection timeout. In some cases, requests are answered ...
Martin's user avatar
  • 11
0 votes
1 answer
2k views

WordPress with Nginx + PHP-FPM sometimes slow where slowlog pointing to wp-config.php (PHP 8.1)

I have a recent WordPress 6 installation with MariaDB and PHP 8 FPM running on Docker. Sometimes, request on the frontend have a slow response time on the main HTML document. In this example, one of ...
Lion's user avatar
  • 508
0 votes
1 answer
657 views

How to use WebP images on Apache behind an Nginx Reverse Proxy

My problem is that I have a CentOS Web Panel: Where I have an Nginx Reverse Proxy running on port 80/443 which is forward the requests to Apache 2.4.52 on port 8181. The modules that Apache uses are: ...
Diverti's user avatar
  • 101
0 votes
1 answer
155 views

opensuse php fpm lighttpd 403 is it a permissions-issue

So far I have configured php-fpm configured and is up and running listening to port 9000 lighttpd is running and serves static files the problem that I have seems to be a permissions issue, so i chmod ...
garsev's user avatar
  • 1
0 votes
1 answer
3k views

nginx php file auto download instead execution on http and 404 Not Found on https

problem 1 : i trying to access my site under ip local address using http, everytime i access that, it will download php file meaning not execute. problem 2: i trying access my site under my domain ...
Media Posternet1's user avatar
0 votes
1 answer
2k views

How to install mcrypt for PHP 7.4 on Aws Linux 2?

I'm trying to install mcrypt with yum install php-mcrypt but run into this dependency error: Error: Package: php-mcrypt-5.4.16-9.el7.x86_64 (epel) Requires: php(api) = 20100412-64 installed: php-...
Xander's user avatar
  • 101
0 votes
1 answer
4k views

Service php8.0-fpm refuses to start

I was about to do some changes to the php.ini and when I checked the service I found out that is was in a failed state. Stopping and starting the service didn't do the trick. The most helpful log ...
ios.id0's user avatar
  • 111
0 votes
3 answers
4k views

Performance tuning PHP-FPM: How to tune the number of child processes

pm = dynamic pm.max_children = 20 pm.start_servers = 10 pm.min_spare_servers = 2 pm.max_spare_servers = 4 pm.max_requests = 1000 Assume using above configuration. Is it possible to know the following?...
Ryan's user avatar
  • 6,011
1 vote
1 answer
2k views

Override PHP OpenSSL config

Is it possible to tell php to read a specific openssl.cnf file instead of default one? # php --info | grep "Openssl" Openssl default config => /usr/lib/ssl/openssl.cnf Using PHP-FPM so a ...
CrazyRabbit's user avatar
0 votes
0 answers
235 views

brotli on apache with proxy_fcgi for PHP-FPM is not used

I'm running an apache 2.4.54 with broti enabled. brotli configuration as seen below and loaded before default deflate configuration. $ cat /etc/apache2/mods-available/brotli.conf <IfModule ...
M Klein's user avatar
  • 101
0 votes
1 answer
162 views

Server works only when listen.mode is set to 0777

I was getting 502 Bad Gateway. I checked and saw that the default is: listen.owner = www-data listen.group = www-data listen.mode = 0660 so I changed it to listen.owner = www-data listen.group = www-...
pileup's user avatar
  • 239
1 vote
1 answer
19k views

Unable to start php-fpm on ubuntu 20.04

I am trying to start php8.1-fpm and i get the following error (while php8.0-fpm and php7.4-fpm start correctly). Any help would br greatly appreciated. [root@ ~]# systemctl status php8.1-fpm.service ● ...
Yannis Sintos's user avatar
1 vote
0 answers
154 views

Octopus deployment causes 100% CPU usage in PHP-FPM

Environment: AWS OS: GoldenImage-amazonLinuxV2-2021-01-04_19.43.07 Nginx: 1.20.0 PHP-FPM: 7.3.33 Octopus tentacle: 6.1.1351 The old method So we currently use a simple push script to deploy a PHP site ...
WeaponX86's user avatar
0 votes
0 answers
2k views

Fix 502 Bad Gateway

I have Nginx running on Ubuntu server (digital ocean), I've setup LEMP stack for hosting the Wordpress website. I'm getting 501 Bad Gateway when I try to reach website using the IP address. I see this ...
Arkadi's user avatar
  • 101
0 votes
0 answers
771 views

Nginx 502 Issue with the API & php-fpm

I've configured the new dev machine but can't get nginx working with the API as it is supposed to. The current error is that 'curl localhost/api' returns a 502. Host: Nginx PHP 8.1.x, php-fpm ...
Santosh Baruah's user avatar
3 votes
1 answer
31k views

proxy_fcgi:error: The timeout specified has expired: Error dispatching request to : (polling)

my web server reaches the state of being unreachable every 1-2 days until I completely restart the server. The server is Debian Bullseye with the newest Apache + PHP 7.4. I'm using FPM, because I want ...
kanka.dev's user avatar
0 votes
1 answer
1k views

Nginx rewrite rule to make php see https scheme

I want my pho application to only see the https scheme even if the secure connection is already terminated. I have the following setup: Browser --https--> nginx --http--> nginx --> php-fpm ...
Tarion's user avatar
  • 113
0 votes
3 answers
677 views

Debian: how to put two versions of libcurl on one system?

I'm trying to migrate two web apps on single server(debian10), both require different versions of php, and both require cURL extensions to work properly. php5.6-curl uses libcurl v3 php8.1-curl uses ...
Robert Grubba's user avatar
1 vote
1 answer
5k views

Ubuntu 22.04 php8.1-fpm wifth Apache - 403 Forbidden You don't have permission to access this resource

I installed php8.1-fpm on Ubuntu 22.04. In principle, I set everything up, but still "403 Forbidden You do not have permission to access this resource "error message is displayed. The system ...
Teo76's user avatar
  • 11
0 votes
0 answers
45 views

php config - generate hashed password manually

I've created a php conf file, which include some user / password infos. For testing purposes I've added the password for the database in plain text. Since this can't be a good idea, I want to change ...
zippy-flop's user avatar
0 votes
1 answer
2k views

How to set SELINUX HTTPD User Content RW?

I'm quite new to SELINUX, I've simple question, I know there are httpd_sys_rw_content_t for /var/www/html, and read only httpd_user_content_t, but if I want to allow some folder to be RW for that ...
Benyamin Limanto's user avatar
0 votes
0 answers
1k views

php8.0-fpm service not loading

I recently upgraded from PHP 7.4 to PHP 8.0. It seemed to work just fine until I rebooted. It looks like my PHP service isn't loading. user@server:~$ sudo systemctl status php8.0-fpm ● php8.0-fpm....
Simunza Muyangana's user avatar
1 vote
1 answer
1k views

How to measure CPU usage per site in a nginx + apache + php-fpm setup

If I have a server with nginx as reverse proxy and Apache + php-fpm as server. I also have a ton of websites on this server, say 200+. I want to write a script which can tell me how much CPU is used ...
Vikas Singhal's user avatar
0 votes
1 answer
3k views

How do i install php 8 without php-fpm and nginx modules?

I am trying to install Apache2 + PHP 8.1 in a fresh install of a Centos 8.5 server. This is my server setup: [centos@api-stg html]$ cat /etc/*elease CentOS Stream release 8 NAME="CentOS Stream&...
Superveci's user avatar
2 votes
1 answer
6k views

What is this NGINX location for PHP FPM fastcgi_pass 127.0.0.1:9000 really doing?

What is this NGINX location for PHP FPM fastcgi_pass 127.0.0.1:9000 really doing? Here's my locations and I have no errors, but I'd rather fully understand that line. # pass the PHP scripts to FastCGI ...
Shannon Saylors's user avatar
1 vote
1 answer
1k views

What would prevent php-fpm (8.0.16) from being able to write to an NFS mounted filesystem?

I have a php-fpm (8.0.16) instance that cannot write files to an NFS share. I am using a simple php script for testing: <?php ini_set('display_errors', 1); ini_set('error_reporting', E_ALL); $fp =...
cplater's user avatar
  • 11
0 votes
0 answers
137 views

How to set up multiple apache + php-fpm + mariadb service groups on a single server with per-group resource limits?

We have a centos8 web server hosting hundreds of websites, using 3 services: apache, mariadb and php-fpm. Because apache and mariadb do not support per-account resource limitation, all websites have ...
Ján Lalinský's user avatar
0 votes
1 answer
2k views

nginx 404 .php extension with fpm

When I visit a non-existent url with .php extension I get a ngnix 404 error page, however url without .php extension it works as expected using the try_files. Where the 404 is handled via php ...
John Magnolia's user avatar
1 vote
0 answers
2k views

How to avoid "Could not resolve host" inside Docker under heavy load?

the problem I am dealing with for months is explained very easy: I am running PHP-FPM with docker, and whenever the server load is increasing I randomly get "Could not resolve host" errors (...
michabbb's user avatar
  • 131
0 votes
0 answers
1k views

Slow PHP-FPM startup on new VMs

I have an Ubuntu 18.04 virtual machine that is started up automatically by an Azure VMSS. It appears that PHP-FPM is taking up to 60 seconds to startup when the VM is turned on. I was under the ...
JimmyBanks's user avatar
2 votes
1 answer
2k views

How to fix PHP open_basedir restriction restricting access to subdirectory on nginx server

I am using nginx with php-fpm, and we are receiving a lot of errors like this: 2022/01/23 12:48:13 [error] 5514#5514: *9277 FastCGI sent in stderr: "PHP message: PHP Warning: file_exists(): ...
Barry Chapman's user avatar
0 votes
2 answers
11k views

Getting 503 with apache proxy_fcgi_module [SOLVED]

I'm using CentOS 9 Stream on a VM, trying to setup my apache server to be able to show php content on the web. The server works fine when its just html, but I'm getting these errors (503 in the ...
bejgli's user avatar
  • 3
0 votes
1 answer
4k views

Restart PHP FPM as root - Authentication is required to restart 'php7.4-fpm.service'

I have a www-data user, I allowed to restart PHP FPM by him in /etc/sudoers: www-data ALL=(ALL) NOPASSWD:/usr/sbin/service php7.4-fpm restart /etc/sudoers has right permissions ls -la /etc/sudoers -r-...
freento's user avatar
  • 135
0 votes
0 answers
2k views

PHP errors appear in PHP and Nginx containers

I've been playing around recently with moving away from file based logging locally in a PHP app, to pushing PHP errors through stdout so they're output alongside the other logs in a docker setup. This ...
robjmills's user avatar
  • 990
0 votes
1 answer
1k views

Nginx php-fpm 1 of 3 pools not working: returns stat() failed (13: Permission denied)

I have nginx with 3 pools for php7.4-fpm - one for each of 3 users on the system as they have their own apps and files. The setup of all 3 is completely identical, but the recently added one has some ...
lion's user avatar
  • 23
0 votes
1 answer
633 views

php-fpm & Apache 2 - analysing PHP Message: logs

One of my servers has recently been switched to using php-fpm. The error logs now log 404's in a new format: [Sun Dec 26 00:11:37.827426 2021] [proxy_fcgi:error] [pid 25239:tid 140600822003456] [...
steve's user avatar
  • 153
0 votes
1 answer
169 views

Joomla redirects wrong after POST

Situation: FreeBSD 13 server with Apache 2.4 as reverse proxy on SSL. Bastille jail with nginx on port 80 and joomla 4.04 Problem: When doing a POST within Joomla (actually any POST except the one ...
GTeley's user avatar
  • 21
0 votes
0 answers
89 views

Infinite request with a big URL php-fpm

I have a zend application running in lenp stack. Nginx 1.18, php 7.4.26,Ubuntu 20.04. For this app I'm using ec-2 AWS and a database in RDS. So, the problem is. I have some big queries who as passed ...
Jonas S. Marques's user avatar
0 votes
1 answer
298 views

Php-fpm doesn't start after some changes

I'm using php-fpm 7.3 with apache on the centos 7. I installed php and apache with directamin control panel on my server before. I added these below configs in to the global section of php fpm in /usr/...
Parsa Saei's user avatar
0 votes
1 answer
1k views

php_admin_value on php-fpm pools aren't working

My php-fpm pools look like this (as per https://www.php.net/manual/en/install.fpm.configuration.php#example-24 this is a very valid synthax:) [vmtest] prefix = /srv/users/vmtest user = vmtest group ...
CrazyRabbit's user avatar
0 votes
1 answer
361 views

HAProxy downloads PHP files instead of displaying in browser

I have nginx and php-fpm running on Docker. When using the hostname of my Docker system (docker1.freekb.net), the phpinfo.php page displays in the browser, thus I know that I have nginx and php-fpm ...
JeremyCanfield's user avatar
0 votes
1 answer
246 views

Lots of suspicious GET requests that overload my CPU

I have a DigitalOcean droplet that hosts a small website with pretty much no traffic. Yesterday, I received an alert that my CPU was over 95%. Normally it runs between 1% to 5%. In the "bandwidth&...
fraxool's user avatar
  • 99
0 votes
1 answer
2k views

Apache not sending headers to PHP over FCGI/PHP-FPM

I have a virtual host configured to process PHP files over Proxy:FCGI, and it works fine, except that PHP is not receiving custom headers and others, like "Origin". Here my Apache 2.4 ...
Diogo Braga's user avatar

1 2 3
4
5
44