My Java application's logs have R14 errors in them
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
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.