After Upgrade To JRuby 9.1.9.0, Rails CookieStore Very Slow When Handling Encrypted Cookies

狂风中的少年 提交于 2019-12-12 04:05:26

问题


I recently upgraded a JRuby 1.7.x based Rails 4.2.5 Web application to JRuby 9.1.9.0. When I deploy the to a web server, page loads take up to 60sec. I profiled the code and the bulk of the time is being spentt in the ActionDispatch::Session::CookieStore call method. I suspect this bottlenect is potentially related to jopenssl gem's encrypt/decrypt being slow but I have not found any help articles or solutions online.

Any insight into this issue, possible options to configure JRuby would be appreciated. The issue did not occur in JRuby 1.7.x


回答1:


export JRUBY_OPTS=-J-Djava.security.egd=file:/dev/./urandom should do it

(or a jruby-openssl upgrade to 0.9.21)



来源:https://stackoverflow.com/questions/45111894/after-upgrade-to-jruby-9-1-9-0-rails-cookiestore-very-slow-when-handling-encryp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!