简体   繁体   English

OOM使用CRON但不使用SHELL

[英]OOM using CRON but not using SHELL

When I start a java program with high memory usage ("-Xmx52g") by shell, everything is working well. 当我通过外壳启动内存使用率很高的Java程序(“ -Xmx52g”)时,一切运行良好。 However if I start the same program with the same command and same user by CRON, I get a java.lang.OutOfMemoryError just after a few seconds. 但是,如果我用CRON用相同的命令和相同的用户启动相同的程序,则几秒钟后就会收到java.lang.OutOfMemoryError。

Additionally CRON isn't able to do anything as long as I don't kill the blocked java program. 另外,只要我不杀死被阻止的Java程序,CRON就无法执行任何操作。 No matter which cronjob should be started, it always ends up with "(CRON) error (can't fork)" in syslog. 无论应该启动哪个cronjob,它始终在syslog中以“(CRON)错误(无法分叉)”结束。 After killing the java program all new cronjobs are working fine again. 杀死Java程序后,所有新的cronjobs都可以正常工作。

The problem only occurs with Ubuntu 16.04, all older versions worked very well. 该问题仅在Ubuntu 16.04上出现,所有旧版本均运行良好。 Is this a bug or a new security feature? 这是错误还是新的安全功能? I didn't find any information about this issue, so I hope anyone may help. 我没有找到有关此问题的任何信息,因此希望任何人都可以提供帮助。

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

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