python-buildpack: Not enough information about workers being killed by kernel OOM
What version of Cloud Foundry are you using?
v245
What version of the buildpack you are using?
python_buildpack-cached-v1.5.10.zip
If you were attempting to accomplish a task, what was it you were attempting to do?
When running an application that uses python gunicorn with very little memory, the gunicorn workers get killed by the kernel OOM. That is fine and expected.
But the gunicorn master is monitoring those workers and restarts them immediately, which is fine.
The problem is that this restart event is never logged properly, or detected by garden+rep, so you cannot easily visualise what is happening.
What was the actual behavior?
cf eventsdoes not reflect any change in the container, because the master gunicorn never gets restarted,cf logsonly shows the messageERR [2016-12-07 11:45:54 +0000] [31798] [INFO] Booting worker with pid: 31798which does not give too much info of what is going on.- kernel logs includes a full message:
What did you expect to happen?
To get more information about what is actually happening. We could log that the worker has been killed and restarted, if possible explaining that was due a Out of Memory.
Maybe this can be implemented with hooks/signals http://docs.gunicorn.org/en/stable/signals.html
I also wonder:
- Should gunicorn actually die if the worker dies and not restart it? This way CF/Diego would do its work and restart the instance.
- Should garden somehow detect that the child of gunicorn died by OOM? is that possible to implement? this question might have to be escalated to garden+Diego.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (8 by maintainers)
@vanschelven Apologies, it’s been 7 years since I last looked at this and I can’t remember anything about it!