Skip to content

fix: log worker failures #1437

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

Merged
merged 2 commits into from
Mar 10, 2025
Merged

fix: log worker failures #1437

merged 2 commits into from
Mar 10, 2025

Conversation

AlliBalliBaba
Copy link
Contributor

This PR fixes 2 small issues that also came up in #1421.

I've noticed before that any error that is thrown during a worker start is not actually logged anywhere. While php in dev mode will log any fatal errors to stderr, in the dunglas/frankenphp image this is actually not the case.

There exists logic for logger.Info() to output everything during worker startup, but that logic never gets triggered since PHP will not attempt to call ub_write if sending headers fails. This PR fixes that by 'faking' a successful sending of headers.

This PR also makes workers fail everytime if frankenphp_handle_request has not been reached.

@dunglas dunglas merged commit 8d9ce15 into main Mar 10, 2025
55 checks passed
@dunglas dunglas deleted the fix/worker-failures branch March 10, 2025 21:50
@dunglas
Copy link
Member

dunglas commented Mar 10, 2025

Good improvement

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

Successfully merging this pull request may close these issues.

3 participants