OOM using CRON but not using SHELL under 16.04

Asked by DOB82

When I start a java program with high memory usage ("-Xmx52g") by shell, everything is working well. 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.

Additionally CRON isn't able to do anything as long as I don't kill the blocked java program. No matter which cronjob should be started, it always ends up with "(CRON) error (can't fork)" in syslog. After killing the java program all new cronjobs are working fine again.

The problem only occurs with Ubuntu 16.04, all older versions worked very well. Is this a bug or a new security feature?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mike O'Rourke (morourke) said :
#1

I have a Java OutOfMemoryError on Ubuntu 16.04 (with the Wowza Streaming Engine software.) Stopping the service would hang until the java process was killed from the shell.

Try booting your system into an older kernel (I had 3.16.0-41 hanging around), leaving everything else the same, and see if the problem goes away. Mine did.

I know this is not a solution, but it would point to one if it makes things work correctly in other systems!

Can you help with this problem?

Provide an answer of your own, or ask DOB82 for more information if necessary.

To post a message you must log in.