Skip to content

feat: add support for PHP timeouts on Linux - #128

Merged
dunglas merged 8 commits into
mainfrom
feat/timeouts
Mar 5, 2023
Merged

feat: add support for PHP timeouts on Linux #128
dunglas merged 8 commits into
mainfrom
feat/timeouts

Conversation

@dunglas

@dunglasdunglas commented Dec 20, 2022

Copy link
Copy Markdown
Member

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
Comment threadDockerfile
ldconfig && \
php --version

FROM php-base AS builder

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

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.

Comment threadfrankenphp.c
@dunglas

Copy link
Copy Markdown
MemberAuthor

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 mainMar 5, 2023
@dunglas
dunglas deleted the feat/timeouts branch June 26, 2023 19:19
Sign up for freeto 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

@dunglas@withinboredom