简体   繁体   English

Spring Boot在AWS上的Docker上登录到System Out是否会导致内存泄漏?

[英]Is Spring Boot Logging to System Out in Docker on AWS a memory leak?

I have a Dockerised Spring Boot app running happily in AWS and have configured the awslogs driver to stream log entries to CloudWatch. 我有一个在AWS中愉快运行的Dockerized Spring Boot应用程序,并且已配置awslogs驱动程序以将日志条目流式传输到CloudWatch。 My app is configured to log to system out, which I presume awslogs driver is listening to for log entries. 我的应用程序配置为登录到系统注销,我假设awslogs驱动程序正在侦听日志条目。 However, if my service is long-running are the logs (to system out) effectively a memory leak? 但是,如果我的服务长时间运行,日志(到系统输出)是否有效地导致了内存泄漏? If so, am I better logging to rotating files and somehow configuring awslogs to read from those files? 如果是这样,我是否更好地记录到旋转文件并以某种方式配置awslogs以从这些文件读取? (Documentation pointers for the latter case would be much appreciated.) (对于后一种情况的文档指针将不胜感激。)

It shouldn't be a problem of OOM error unless there's a too big string is logged. 除非记录的字符串太大,否则应该不是OOM错误的问题。 Here is an answer for similar question. 是类似问题的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM