Why am I getting R14 Errors in Java

Issue

My Java application's logs have R14 errors in them

Resolution

This error indicates that your dyno does not have enough RAM to contain the JVM's memory. As a result the Linux operating system has moved some pages to disk (a process called swapping). When the operating system does this, it does not differentiate between heap and non-heap memory in the JVM. If heap memory is swapped, it can result is significant performance degradation.

To change Java's memory usage, use the arguments -Xms<memory> or -Xmx<memory>. Use m or g after the numbers to indicate Megabytes and Gigabytes respectively. -Xms indicates the minimum and -Xmx the maximum.

Refer to Troubleshooting Memory Issues in Java Applications for details.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support