-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.3] Docker / Queue process unexpectedly 0 exits with no errors logged #17183
Comments
This is the expected behaviour. They "restart" when they've used enough memory that they need a reboot. By "restart", I mean that just quit, and they expect that someone else will restart them. It's normal to use something like supervisor to manage that. |
Thanks for the explanation @GrahamCampbell.
Is there any signaling from the process prior to it exiting that it needs to restart? I would argue a process exhausting its memory allocation – either a hard or soft memory limit – should not exit with a If I use an Currently in both my 5.3 and 5.2 environments, an automated deployment script does the following:
This procedure effectively "drains" any queue worker before updating and restarting. As it stands I'm not sure of a solution to this problem given the current behavior. Can we reopen this thread for further discussion? Again, I'd argue exiting with Any ideas from the community would be appreciated. |
After reviewing the source, I do believe this should be addressed. Please reopen the issue. The daemon() method of the stop() is where the issue lies.
There is currently no way of changing this behavior and there should be for reasons I mentioned in my previous comment. A few possible solutions are:
https://en.wikipedia.org/wiki/Exit_status I favor option 2 as it as it allows for configuration of the exit code and is backward compatible. Feedback is welcome and I'm happy to provide a PR if we agree on a resolution. |
I've realized in 5.2 this is the same behavior – exiting with 0. Can we reopen this thread and further the discussion @GrahamCampbell @taylorotwell? Again, I'm happy to contribute a PR if we decide on how to resolve this. |
Just for future reference #17302 fixed this. |
Great, thanks @marcvdm! |
Description:
I have Laravel queue worker processes running inside a Docker container on AWS (EC2 Ubuntu 16.4 instance). The containers will run for 4 to 5 days, then unexpectedly exit with a
0
code. Viewing the logs shows no Exceptions thrown from the app. Because the container is run with a restart policy ofon-failure
and the process is exiting with0
, Docker will not restart the container.There are no resource constraints currently on the containers and the EC2 instance is not reporting any high resource utilization.
Interestingly, I have a similar stack as this one but is running Laravel 5.2 and does not suffer from this issue. My assumption is this may be due to the changes made to the Queuing logic in 5.3.
The
docker-entrypoint.sh
file, which Docker executes as ENTRYPOINT is:Notable Environment settings.
Logs from the container and information about the status of the container.
Steps To Reproduce:
N/A
The text was updated successfully, but these errors were encountered: