-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Laravel Octane with FrankenPHP doesn't start when xdebug installed #563
Comments
Hi, I am facing the same issue |
It could be worth enabling the xdebug log inside your container and seeing if it shows anything useful. |
FROM dunglas/frankenphp:1.0-php8.3
RUN install-php-extensions \
@composer \
- pcntl;
+ pcntl \
+ xdebug;
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN cp $PHP_INI_DIR/php.ini-development $PHP_INI_DIR/php.ini; \
- sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/' $PHP_INI_DIR/php.ini;
+ sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/' $PHP_INI_DIR/php.ini; \
+ echo "xdebug.log = /app/xdebug.log" >> $PHP_INI_DIR/php.ini;
ENTRYPOINT ["/bin/sh", "-c" , "composer install && php artisan octane:start --server=frankenphp --host=localhost --port=443 --admin-port=2019 --https"] Then running
EDIT, I also did similar by setting |
Next step is to run FrankenPHP with GDB to get a stack trace. |
@dunglas based on the simple |
The easiest way is to use the dev Dockerfile we provide: https://github.com/dunglas/frankenphp/blob/main/CONTRIBUTING.md It's not very easy but I'll take a look when I'll be back from vacation if still needed. |
Thanks @dunglas I may just leave it for you 👍 let me know if you need anything else from me to help out! |
Can also confirm this issue that may not be only related to Laravel. I can reproduce it in a clean Docker with API Platform. Doing two requests at the very same time produces the same result whenever xdebug is enabled. I'm using Symfony docker : https://github.com/dunglas/symfony-docker/blob/main/Dockerfile without any tweak. Didn't try on a latest version, still relying on 1.0 of the frankenphp image. Restarting the container by passing xdebug to Please let me now if you want a repository to reproduce the issue |
This may be an issue with Xebug and ZTS builds. @derickr, maybe you have an idea of what's going on? |
I can't really say much without an actual cause and GDB trace here. Does it not start? Does it crash? There is simply not enough information here. However, there are these bugs, that could be related (but still can't reproduce in a small example): |
Hi, having same issue on arm (M1 mac), frankenphp (both worker, no worker) + xdebug (symfony app). CPU usage instantly after 1st request goes to 100% usage for all cores. Is there any debug info i could provide to help identify the issue? |
@JanMikes a backtrace gathered with GDB (or LLDB if you are on Mac and not using Docker) when the bug occurs would be awesome. |
I have the same problem. As soon as a page gets loaded all the cpu cores get stuck at 100%. I use the When commenting out RUN set -eux; \
install-php-extensions \
xdebug \
; And rebuilding everything works fine. This is the php dev config
I set up a gdb with logging for the initial page load where the CPU spikes. Having never used gdb before I am not sure if this is helpful or if more is needed.
I created a small repository for this : https://github.com/DennisdeBest/frankenphp_xdebug The problem appeared as soon as I added the LiipImagineBundle |
Thanks for the reproducer. This is a known issue. Downgrading PHP to 8.2 seems to prevent the issue. Downgrading XDebug itself seems to work too. |
Had anybody been able to reproduce this with a one liner *not* using docker?
|
thanks @dunglas I have no problem when moving from |
@derickr I managed to reproduce the issue (a segmentation fault that seems related to an infinite recursion) without Docker (on Ubuntu, bare metal x86_64):
I get this stack trace:
|
I am experiencing the same issue with API Platform, regardless of the Xdebug extension, and after downgrading to the tag |
Fixed by xdebug/xdebug#958. |
Looks like the documentation forgot to be changed, since it's now fixed Should I make a PR ? |
The new xDebug version was released with the fix : |
What happened?
As requested in laravel/octane#829 (comment), I'm opening the issue here.
Octane Version
2.3.1
Laravel Version
10.42.0
PHP Version
8.3
What server type are you using?
FrankenPHP
Server Version
1.0
Database Driver & Version
No response
Description
Octane is immediately being killed when using the FrankenPHP Docker image with xdebug installed. When xdebug isn't installed, everything works fine.
Probably one for @dunglas.
Steps To Reproduce
After cloning this repo (which is basically just a fresh Laravel app) and
cp .env.example .env
, make the following simple change toDockerfile
:Then on the terminal run:
When we don't install xdebug in the Dockerfile though (as is the case on the linked repo), Octane runs indefinitely as expected.
There's nothing in
laravel.log
so I don't even know where to start debugging this, let me know what you need and I'll be more than happy to help!Build Type
Docker (Debian Bookworm)
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
x86_64
Relevant log output
No response
The text was updated successfully, but these errors were encountered: