-
Notifications
You must be signed in to change notification settings - Fork 455
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
Lager version 3.5.2, issue of excessive memory usage #578
Comments
My erlang program is deployed in a Docker environment, and the lager writes console logs to the console.log file. However, for unknown reasons, it stores the logs in memory messages instead of writing them to the file. |
When this issue occurs, the lager no longer writes logs to the console and console.log file, blocking messages in memory and unable to release them, resulting in an increasing memory usage. The original console log level was debug, but this issue occurred. I adjusted the console log level to warning and wrote the debug level log to a file instead of the console and file. It seems that this issue has been significantly improved, and there has been no problem of excessive memory usage again. |
and you're not logging to stdout or another non-file backend at all? how many logs do you think you were generaying per second? |
I output the logs to both the program console and console.log file at the same time, and the speed of the problem depends on the frequency of the log output. When there are more than ten logs per second, this problem occurs in three or four days of college. When there are forty to fifty logs per second or even higher, this problem occurs in less than half an hour. Perhaps I can send out the tiger configuration file to take a look, but it will need to wait until next Monday. If I increase the console log level and lower the log level output to the console.log file, can I also solve this problem? Because the system has already been launched into the production environment, when this issue occurred, I set the console and output log levels to a high level, which prevented me from seeing some debug logs and preventing me from stopping my application. |
After this issue occurred, I changed my lager configuration file and raised the console log level, making it almost impossible for logs to be output to the console. Secondly, I will output the debug logs to a log file. The log output rate may be around 40-50 per second, and there is no memory freeze caused by the inability to output logs to the console and files, which seems to solve this problem. |
My English proficiency is not very good, and I often use translation software to translate into English, which may cause confusion. I hope you can forgive me. |
The text was updated successfully, but these errors were encountered: