docker
docker copied to clipboard
Bug: --dev=reload will break longpolling
After a whole day of debugging why I couldn't get longpolling working with multiple workers in docker I finally narrowed it down to this:
In entrypoint.sh, if you add --dev=reload
the Evented Service (longpolling) won't start!
..
exec odoo --dev=reload "$@" "${DB_ARGS[@]}"
..
This must be a bug, or at the very least unwanted behavior which must be documented. Some additional info from another thread #283
Edit: Replaced all with reload since this is the one creating the problem
I cannot reproduce, I tried this:
docker run --rm -p 8069:8069 --name odoo --link db:db -t odoo:12.0 -- --dev=reload --workers=4
And it starts.
I even tried with a docker-compose file to test the interface and it works.
It's been a couple of years since I touched this, but just had to now because of debug purposes. I managed to dig all the way down the rabbit hole and found out that this works for you and not for me because I use an older version of Odoo 12 (spesifically one of 11.feb 2019) which does not have this commit:
https://github.com/odoo/odoo/commit/7b6cfc412e1af3f8887a02e7c013561126bf1d7c
Which fixes the issues I've had.
I patched this file and got it working in my local Docker container, all good
UPDATE
I was too quick. The rabbit hole had a hidden basement and went way deeper. While this patch didn't break the longpolling worker on 8072 it did break hot reloading, ie watchdog just doesn't work with multiple workers..
I'm done debugging this.