Skip to content

feat: add support for PHP timeouts on Linux #128

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 8 commits into from
Mar 5, 2023
Merged

feat: add support for PHP timeouts on Linux #128

merged 8 commits into from
Mar 5, 2023

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Dec 20, 2022

This patch adds support for PHP timeouts (require a patch to PHP).
It also fixes some potential goroutine leaks in worker mode and contains a refactoring of the worker code.

TODO:

  • use a version of PHP containing the needed patch
  • support for timeouts in worker mode

@dunglas dunglas marked this pull request as ready for review January 2, 2023 17:35
ldconfig && \
php --version

FROM php-base AS builder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a feeling this would happen :)

Does this impact #133 by any chance?

I just saw 8.2.2 was released, so is this still needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, we'll still need this until php/php-src#10141 isn't merged and included in a stable release. At least if we want timeouts support.

@dunglas
Copy link
Member Author

dunglas commented Feb 20, 2023

The last commit contains a refactoring of the worker code. It fixes an existing problem: in main, if a worker script crashes, the handled HTTP request is never terminated and the TCP connection is never closed. This is now fixed.

@dunglas dunglas merged commit 75cd310 into main Mar 5, 2023
@dunglas dunglas deleted the feat/timeouts branch June 26, 2023 19:19
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.

2 participants