0

I have a server with PHP7 FPM and Apache 2.4. I've set it up to running user pools. I have several PHP-FPM pools on the server. Only one is timing out and experiencing connection failures.

This is the pool configuration for that user pool:

[pool_user]
user = pool_user
group = pool_user
listen = /run/php/php7.0-fpm.pool_user.sock
listen.owner = www-data
listen.group = www-data

pm = dynamic
pm.max_children = 1000
pm.start_servers = 100
pm.min_spare_servers = 50
pm.max_spare_servers = 500
pm.process_idle_timeout = 10s
pm.max_requests = 500

I'm getting a stack of weird errors, that I can't seem to shake. These are from the Apache error log

  • AH01079: failed to make connection to backend: httpd-UDS
  • AH01075: Error dispatching request to :
  • AH01067: Failed to read FastCGI header

And it seems like no matter what I tweak or change it won't resolve the issue. Can anyone give me some guidance on this?

Thomas
  • 135
  • 1
  • 3
  • You need to study the performance of the actual PHP application in order to fix this issue. There is most likely some code that is slow to execute, which shows up as errors you showed. – Tero Kilkanen Nov 06 '17 at 22:28
  • I've been thinking that, and we've been profiling the MySQL query performance, but the weird thing is that it seems random. We're seeing these errors on pages/sections of the application which next to no heavy PHP code or MySQL queries. I would assume that if the performance really was a problem it would be isolated to the sections of the application that has alot of code to execute and what not. – Thomas Nov 07 '17 at 10:32
  • You need to monitor the number of active pool workers over time and see if there is a correlation between errors and worker numbers. It is also useful to monitor how long requests take on average and how much difference there is to longest request time. One possibility is that the workers are simply blocked by something, and the pool of workers is exhausted, causing the errors. – Tero Kilkanen Nov 07 '17 at 20:37

0 Answers0