Tomcat slowly outputs the rendered content from Ruby On Rails 5.2

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Tomcat slowly outputs the rendered content from Ruby On Rails 5.2



I'm having trouble running my Rails 5.2 app in Tomcat with JRuby. The complete application got developed using JRuby. When we were using Rails 3 everything worked fine but now, after an upgrade to Rails 5.2 we run into the following issue.



We start a request and the page gets directly rendered according to the logs but tomcat doesn't send the results after receiving the response from rails. It takes about 1 min until tomcat sends the response to the browser / client.


Aug 08, 2018 3:07:22 PM org.apache.catalina.core.ApplicationContext log
INFO: I, [2018-08-08T15:07:22.510615 #29113] INFO -- : [32c6ec9d-ce00-4e80-a881-90841fb3e608] Completed 200 OK in 921ms (Views: 656.0ms)



JRuby 9.1.17



Tomcat: 7



Our warble.rb has the following config lines:


config.dirs = %w(app config lib log vendor tmp)
config.webxml.jruby.min.runtimes = 4
config.webxml.jruby.max.runtimes = 4
config.webxml.jruby.runtime.acquire.timeout = '30.0'



We checked the logs and everything but we don't know what causes the issue. Anyone has a clue?



We also set this env vars:


export CATALINA_OPTS=-Djava.security.egd=file:/dev/urandom
export JRUBY_OPTS=-J-Djava.security.egd=file:/dev/urandom





might be very specific to 5.2 ... hard to tell. maybe you could try setting min/max runtimes to 1 since Rails and most gems are thread-safe (assuming your code is as well).
– kares
Sep 11 at 7:18









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard