diff options
| author | xmo-odoo <xmo@odoo.com> | 2018-05-07 11:24:06 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-07 11:24:06 +0200 |
| commit | 4e5119c6e52e0364a39a7883f9df5db5441607cb (patch) | |
| tree | 1adb98880791e258146f6240aa6a787064707a9f /addons/web_editor/static/src/js/editor/transcoder.js | |
| parent | d13ce05c9641c0b56eb4e270339948e59a542874 (diff) | |
[IMP] warn when using logrotate in multiprocess
The built-in log rotation is *very* unreliable in a multiprocess
context, which can lead to significant data loss (up to hours of log
missing) right after rotation[0][1].
Technically, according to the cookbook even filehandler does not
support multiprocess logging[2].
Either way, we should at the very least warn that logrotate is a Bad
Idea in multi-workers scenario. Ideally we'd just fall back on regular
file/stream logging but that likely could & would break existing
deployments, so maybe implement that for master instead?
Alternatively: implement it properly in multi-worker scenario with
only the "root" process actually logging to whatever output was set
up, and all workers sending stuff to log to it via a queue or network
socket or w/e.
[0]
https://stackoverflow.com/questions/34186774/why-doesnt-timedrotatingfilehandler-work-properly-and-how-to-solve-this-issuer
[1] https://github.com/odoo/odoo/issues/16566
[2] https://docs.python.org/3/howto/logging-cookbook.html#logging-to-a-single-file-from-multiple-processes
Diffstat (limited to 'addons/web_editor/static/src/js/editor/transcoder.js')
0 files changed, 0 insertions, 0 deletions
