Replies: 3 comments 42 replies
-
|
You have Alternatively, if you have a way to reproduce the crash, you could start frankenphp through gdb and get into a debugging session that way. |
Beta Was this translation helpful? Give feedback.
-
|
Looking at the trace, the segfault seems to occur in a shutdown function. More explicitly, the shutdown function manipulates output buffers (something like I remember there was a similar issue with a third party extension once, don't know which one it was. Do maybe use blackfire or something similar? |
Beta Was this translation helpful? Give feedback.
-
|
Not directly related to the threads above, but maybe food for thought: is there anything that could be done on the FrankenPHP side to help with debugging memory leaks in code? Searching for it I found quite a few people running into the same problem. A bigger code base and FrankenPHP in worker mode with no "easy" way to profile memory allocations for longer running processes. Blackfire, Sentry, XDebug, no tool seems to be able to help. All "solutions" so far I've come across were "I poked around at the code base until I found the leak". The DX feature of my dreams would be "Hey, here's your memory allocation per class / property / global. This is the $property in this class.php that consumed 100MBs of memory before kernel (worker?) shutdown." Can something like that even be done? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Recently (starting around a deploy on January 2nd) I've been getting crashes in our Docker container without any indication on why and where they happen. I cannot reproduce them locally and they happen infrequently (sometimes multiple times in a few hours, sometimes after days).
After removing core limits, I get huge core dumps of 1.4GB (PHP memory limit 256MB). The only log line that comes at least a little bit close is
docker-97da20bc7166cdb1414cde3710ee7089b886fca5966096203743b17cc6d01936.scope: Consumed 6h 20min 6.235s CPU time, 1.7G memory peak, 44M read from disk, 1.9G written to disk.from the docker unit, where typically a container would write only a few MBs in days.I compiled FrankenPHP with the same Caddy modules our live container is using and debugging symbols enabled:
Here's what gdb has to say:
If it was PHP code, I would expect it to fail and then just log like any normal "out of memory error". I suspect it's a PHP extension, but except for updating FrankenPHP to 1.11 there were no other updates corresponding to the deploy date.
After running for two days now I can't see anything suspicious in the metrics either:
The worker crashes correspond to a strange
Maximum execution time of 35 seconds exceeded in /application/vendor/symfony/http-foundation/Response.phpwe've been getting for a very long time now. There are no scripts that could somehow run in this timeout at all, so recently I've been thinking these are client related issues with HTTP/3 (client goes away before being able to send early hints, e.g.), but that's another issue entirely.frankenphp build-info
Beta Was this translation helpful? Give feedback.
All reactions