Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jobs running in-parallel processes not working in PHP 8.1.22, 8.2.9 (exclusively) #2828

Closed
mozkomor05 opened this issue Aug 27, 2023 · 1 comment
Assignees
Milestone

Comments

@mozkomor05
Copy link
Contributor

mozkomor05 commented Aug 27, 2023

After three hours of debugging, I found that the latest PHP patch versions 8.1.22 and 8.2.9, which many people use, have a changed way of getting the PID after SIGCHLD (see php/php-src#11509). This change is reverted in the PHP development branch (php/php-src#11863).

This causes asynchronous jobs to not be marked as complete and cron.php to run indefinitely. When used with a daemon, this causes cron to stop completely as all daemonMaxProcessNumber processes are stuck.

The developers of spatie/async were quick to react to this change, so you need to update the dependency to the latest version.

NOTE: This is the relevant fix, that new dependency version adds:

https://github.com/spatie/async/blob/59985e70e94b8afb1ef1d65de73e8f80cddb4146/src/Pool.php#L323-L335

@mozkomor05 mozkomor05 changed the title Old spatie/async version causes stuck cron Old spatie/async version causes stuck cron with parallel execution Aug 27, 2023
@yurikuzn yurikuzn self-assigned this Aug 27, 2023
@yurikuzn yurikuzn added this to the Version 7.5.6 milestone Aug 27, 2023
@yurikuzn yurikuzn changed the title Old spatie/async version causes stuck cron with parallel execution Jobs running in-parallel processes not working in PHP 8.1.22, 8.2.9 (exclusively) Aug 27, 2023
@yurikuzn
Copy link
Contributor

Thanks for reporting. spatie/async is updated to 1.5.6 in v7.5.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants