Skip to content

Action scheduler breaks PHP error reporting and crashes the server #1255

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

Open
kkmuffme opened this issue Mar 27, 2025 · 0 comments
Open

Action scheduler breaks PHP error reporting and crashes the server #1255

kkmuffme opened this issue Mar 27, 2025 · 0 comments

Comments

@kkmuffme
Copy link

When using a custom error handler (e.g. custom or Sentry), then all PHP errors reported by tasks in action scheduler except E_USER_ERROR | E_RECOVERABLE_ERROR will get "lost" (= end up in the PHP error log)

  1. this makes it much harder to keep track of things, since the PHP error log/log monitoring software provides much less useful data compared to e.g. Sentry
  2. we run woocommerce on lots of distributed servers that do not have much disk. If there are lots of tasks (or just a single hanging task Potential endless loop when processing actions in a claim #1245) that have a PHP error (e.g. simple case just an invalid preg_match() the PHP error log will quickly use all available disk (fastest I had was 7 minutes, on average a couple hours) which basically crashes the server

That happens bc https://github.com/woocommerce/action-scheduler/blob/dba9377f26daea2da114b33ddf1431a3550dfb3d/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php#L79C4-L79C38 restricts to 2 (parent) types of errors, which means all other errors will end up in PHP error log.

Kind of related to #1252

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

No branches or pull requests

1 participant