We have a RoR 3.2 app running on JRuby 1.6.6 hosted inside Tomcat via Trinidad.
I've been trying to figure out for the last couple of days why every so often we would get complaints of it hanging.
There are currently only around 20-30 users so occasionally it gets "left idle" (nobody uses it) for up to 20 minutes.
The problem seems to be that if it is left idle the first request it receives (after the idleness) times out (and our nginx proxy serves up a 504 - gateway timeout), but all subsequent requests seem to be okay.
We currently have a maximum heap limit of 500mb and a 1mb stack on the JVM.
Is this enough, if this issue is not resource related how can it be resolved?