php-src icon indicating copy to clipboard operation
php-src copied to clipboard

PHP-FPM worker process stuck after slow log tracing

Open midas104 opened this issue 4 years ago • 4 comments

Description

Hello!

I've discovered strange issue with PHP FPM worker processes. I've setup monitoring using php-fpm exporter + prometheus + grafana. There is metric called request_duration which always increases thats how I discovered that some child processes from time to time got stuck in Processing state for forever. I've attached strace and here is output

strace: Process 22227 attached
restart_syscall(<... resuming interrupted restart_syscall ...>)

There were notрing in dmesg or syslog, but in php-fpm log I've found that this child was stopped by FPM for tracing, so i think that it's root cause.

Thanks in advance!

PHP Version

PHP 7.3.3-1+ubuntu16.04.1+deb.sury.org+1

Operating System

Ubuntu 16.04.1

midas104 avatar Jan 11 '22 13:01 midas104

We do not actively support PHP 7 any longer. Is this still an issue with any of the actively supported PHP versions?

cmb69 avatar Jan 11 '22 14:01 cmb69

Could you also send your FPM config? The fact that it was stopped for tracing is most likely because slowlog is configured and it doesn't need to be the root cause of this. It would be actually helpful if you could look to the slowlog as more details should be there.

bukka avatar Jan 23 '22 22:01 bukka

No feedback was provided. The issue is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so. Thank you.

github-actions[bot] avatar Feb 07 '22 00:02 github-actions[bot]

Ok I think it might be actually related to this bug: https://bugs.php.net/bug.php?id=81275 . I just realised it because I'm looking to the fix in https://github.com/php/php-src/pull/8049 . I will re-open for reference and close it once the fix is merged.

bukka avatar Feb 07 '22 22:02 bukka