Summary: | Stoped PHP-FPM pool in multi-pool system with comunication over UDS exhausts connection and causes mod_proxy_fcgi crash | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | carlos.nieto |
Component: | mod_proxy_fcgi | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | NEW --- | ||
Severity: | normal | CC: | carlos.nieto, szg0000, toscano.luca |
Priority: | P2 | ||
Version: | 2.4.9 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
carlos.nieto
2015-10-08 12:10:06 UTC
Hi Carlos, really sorry for the delay. This bug sounds really bad, would you mind to add some basic data about your httpd version and maybe some steps about how to repro it? Of course Luca, httpd version was 2.4.9, you can repro the bug in a configuration with at least two PHP-FPM pools backends and a apache frontend communicating over UDS. Configuration is something like this: <VirtualHost *:80> ServerName poolA.test.com DocumentRoot "/opt/poolA/htdocs/" <Proxy "unix:/dev/shm/poolA.sock|fcgi://php-fpm-poolA.local"> ProxySet min=0 ProxySet acquire=20 ProxySet connectiontimeout=100ms ProxySet retry=0 ProxySet timeout=300 Require all granted </Proxy> # Sintaxis 2.4.10 <FilesMatch \.php$> SetHandler "proxy:fcgi://php-fpm-poolA.local" Require all granted </FilesMatch> RedirectMatch ^/$ /index.php </VirtualHost> <VirtualHost *:80> ServerName poolB.test.com DocumentRoot "/opt/poolB/htdocs/" <Proxy "unix:/dev/shm/poolB.sock|fcgi://php-fpm-poolB.local"> ProxySet min=0 ProxySet acquire=20 ProxySet connectiontimeout=100ms ProxySet retry=0 ProxySet timeout=300 Require all granted </Proxy> # Sintaxis 2.4.10 <FilesMatch \.php$> SetHandler "proxy:fcgi://php-fpm-poolB.local" Require all granted </FilesMatch> RedirectMatch ^/$ /index.php </VirtualHost> So, you can shutdown one of the PHP-FPM pools, by example poolB, killing their FPM processes, and inject requests to both pools, the active pool poolA responds, and the no active pool, poolB, returns 503 errors. But if you persist the requests to both pool, then sometime crash happens and both pools fails. I have observed this behavior in a production system with high load in a pool with we have shutdowned for maintenance and then past a time, the other pools have begun these failures, so, instead of a simple shutdown, we had to set up a maintenance page. Extra question: since 2.4.9 is a bit old, have you tried to reproduce with a more recent version of httpd? I am asking this because I noticed this entry in the changelog (https://www.apache.org/dist/httpd/CHANGES_2.4) for 2.4.10: *) mod_proxy_fcgi: Don't segfault when failing to connect to the backend. (regression in 2.4.9 release) [Jeff Trawick] https://svn.apache.org/r1592998 If you still have patience and time it would be really great if you could test at least 2.4.10 and see if it solves the problem (or maybe only the patch mentioned above). Also 2.4.9 -> 2.4.12 brought a lot of mod_proxy_fcgi fixes. The more recent version of httpd the better :) Thanks! Luca Hi Carlos, any news? Luca |