Problem is solved! It was related to systemd which starts cronjobs and limits max threads/processes to 512 by default. I'm not sure if this is a good setting since one single user/cronjob is able to prevent any other cronjobs from being executed ("(CRON) error (can't fork)")- system-wide. However as soon as you are aware of, it's no problem to change it.
-- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to cron in Ubuntu. https://bugs.launchpad.net/bugs/1582692 Title: OOM using CRON but not using SHELL under 16.04 Status in cron package in Ubuntu: Incomplete Bug description: 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. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cron/+bug/1582692/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp