0
votes

We are running a Java Play project on Heroku and have been getting endless Error R14 (Memory Quota Exceeded) on the Heroku/scheduler dyno all day.

heroku/scheduler.3831: Process running mem=1058M(103.1%)

heroku/scheduler.3831: Error R14 (Memory quota exceeded)

We currently have 5 daily jobs scheduled, but they all occur after business hours. For some reason though the Heroku/scheduler dyno is hitting memory quota caps all day, despite no jobs actually running.

The web dynos are working without an issue. Has anyone encountered this issue with Heroku Scheduler?

2

2 Answers

0
votes

I'd recommend lowering the max heap size on the scheduler process. Play is somewhat notorious for using lots of native (off-heap) memory (mostly because due to Netty I think). If you lower the heap size, it should allow more room for the native memory.

You can set the max heap size with an option like -Xmx300m on the java command that the scheduler runs.

0
votes

You could try bumping the dyno size for your scheduler job (ex: Standard-1X -> Standard-2X)