-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Synapse OOMs when no loggers use the logcontext filter #1884
Comments
Logs from journalctl:
I also failed to mention in the original issue but this is actually a lx branded zone on smartos running a centos image, in case that matters at all (there is no linux kernel, this is all running directly on top of the illumos kernel). |
I attempted the same thing on my Debian Jessie box:
It started fine initially, but then went into a restart loop with the above messages in the log. |
I'm using following log config on centos7, which works for me. You need to remove the file handler completly
I remember having had a config, where I only dropped the file handler from the root section but kept it in the handler section. That leaded to synapse eating up all memory. |
Thanks for the suggestion. I removed the file section and it was still crashing from OOM. Went back and looked at what might be different between my and your configs, and noticed that yours added the context filter, so I went ahead and added that and it runs fine now. Leaving this open since it still seems like a bug. |
Have you tried to delete the context section when not using it? Seemed strange to me as well, already getting into big trouble only by trying to find a good log config. I would do a quick check but for the moment I'm chasing my own synapse leaking FDs :) and don't want to restart Reading Python Log Config and Good logging pratice in python seems to indicate that the log config shall only contain definitions that are used. |
I think you can fix this is one of two ways:
|
How about adding instructions on setting logging levels to |
@Aster-the-Med-Stu A pull request is always welcome if you have suggested wording. |
I am trying to make synapse only log to stdout/err (which is then collected by a service manager and saved) and remove all of the file logging since it is redundant. I am using 0.19.0 on centos and currently using this for my log config:
If I remove the
file
handler from the handlers at the bottom of the config, synapse core dumps on startup after about a 2-3 second delay. I can removeconsole
or even remove both handlers without crashing the program, but if i removefile
and only leaveconsole
, i see the crash.As a temporary workaround as you can see I have changed the file logger to log to /dev/null but this is not a great solution.
I'm not sure if the core dump is of any use since symbols are stripped from my python install, otherwise i would provide a backtrace here.
The text was updated successfully, but these errors were encountered: