-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Child processes stuck cycling cpu ? #391
Comments
Hello, fellow Rob! I'd recommend running in debug mode and grabbing a trace (which I just realized there is not really any good documentation on 🤔). This pretty much sums up what is needed: https://mercure.rocks/docs/hub/debug (add Then go to http://localhost:2019/debug/ and dump the stack here so we can see what those threads are actually doing. |
I'm not running Mercure though (not yet). Should debug still be available? I enabled it in global caddy options, and I see the health check is regularly being hit by the docker daemon. But I am unable to access http://localhost:2019/debug/ -- I don't even see the request in the logs of the container. The port is forwarded afaik;
Maybe I should also note that I am using |
Because the admin port allows anyone to take complete control of your caddy instance, it only listens on localhost, port forwarding won't work IIRC. So, you can only call it from within the container and not outside it. |
Ah, I didn't see that you tried that as well 🤦. Is the admin port disabled? |
Yeah I tried that too. |
Nope, like I said, the healthcheck that is configured by default runs without any problems.
|
The admin port isn't exposed by default outside of the Docker container. You have either to expose it, or request it using curl from the inside of the container. |
A docs entry explaining how to run FrankenPHP as non-root with Docker is very welcome by the way! |
Closing as it looks resolved. Feel free to reopen if it's not the case! |
I decided to give frankenphp a try locally in an existing project. We run everything in Docker locally as non-root, which was the first issue I ran into. Setting up Caddy to run as non-root is doable but requires some tinkering that is not very well documented. Once I had that up and running though, I ran into the following issue, which I have no clue how to debug..
Once frankenphp serves a request, there are child processes that remain stuck at using 100% cpu, even if no further requests are made at all. They just keep sucking up cpu cycles, making my laptop sound like a helicopter after a minute or so.
The project currently runs behind caddy with php-fpm. All I did was replace the caddy and fpm containers with a single frankenphp container. I'm not yet using worker mode, but I can try and see if that makes a difference or not.
The text was updated successfully, but these errors were encountered: