forked from RoushTech/docker
zend.max_allowed_stack_size auto-detects ~82KB under ZTS, 500ing ordinary Twig pages #25
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ordinary Twig-heavy pages return HTTP 500 on this image:
Both settings are at their defaults, i.e. auto-detect:
Under ZTS the auto-detection measures FrankenPHP's worker thread stack, which comes out at
~82 KB — far less than a normal
ulimit -s8 MB main stack, so template compilation thatis perfectly fine under php-fpm blows the limit. This is not deep application recursion;
it is a first-page-load failure on a stock Symfony/Twig app.
Workaround, and why it is not a fix
clears it (verified — the failing page goes 500 → 302), but
-1disables the guardentirely: a genuine runaway recursion then segfaults the worker instead of raising a
catchable error. That trade seems wrong to bake into every downstream image.
Suggested fix
Size FrankenPHP's thread stacks so the auto-detected value is sane, or ship an explicit
zend.max_allowed_stack_sizethat matches the real stack. Either way it belongs hererather than in each application image.