php-fpm-healthcheck icon indicating copy to clipboard operation
php-fpm-healthcheck copied to clipboard

Ubuntu - cgi-fcgi isn't terminating

Open far-blue opened this issue 4 years ago • 3 comments

Hi all,

When trying to use this script with ubuntu I'm seeing an ever-growing number of active cgi-fcgi instances and the health checks aren't terminating. Any idea why?

far-blue avatar Feb 25 '20 15:02 far-blue

Hey @far-blue, I'd need more details, like logs, current configuration, exit status codes, and the flags you're using in the command!

renatomefi avatar Feb 26 '20 08:02 renatomefi

Morning :)

Thanks for the quick response - I have managed to work out the problem and it's not cgi-fcgi or your script causing it.

For the benefit of anyone else hitting the same issue, the problem was that I'd setup apache with 'enablereuse' set to 'on' in the php proxy config. This was holding connections to all the php workers open and causing other scripts (i.e. the health check script) to queue indefinitely.

One possible improvement for your script might be to set a timeout and output a message rather than queue indefinitely because unless you are investigating in the container you simply won't notice the possibly hundreds of hanging scripts :)

far-blue avatar Feb 26 '20 08:02 far-blue

That's a great idea to implement a timeout, is that something you'd like to work on?

renatomefi avatar Feb 28 '20 12:02 renatomefi