设置jruby min运行时发生了什么?

时间:2012-12-19 14:30:46

标签: jruby tomcat6 warbler

我现在正在努力研究Jruby on Rails。我们之前没有配置min / max jruby运行时,门户网站运行良好。

在这些日子里,我发现设置这些配置会提高门户网站的性能,所以我决定以这种方式配置它:

config.webxml.jruby.min.runtimes = 2
config.webxml.jruby.max.runtimes = 4

但是,我设置这个后门户无法启动,日志继续抛出java类找不到错误:

INFO: Info: received max runtimes = 4
Dec 19, 2012 1:57:18 PM org.apache.catalina.core.ApplicationContext log
INFO: Info: received min runtimes = 2
Dec 19, 2012 1:57:18 PM org.apache.catalina.core.ApplicationContext log
INFO: Info: received max runtimes = 4
Dec 19, 2012 1:57:18 PM org.apache.catalina.core.ApplicationContext log
INFO: An exception happened during JRuby-Rack startup
cannot link Java class com.portal.util.selector.SelectorUtil, probable missing dependency: Could not initialize class com.portal.util.selector.SelectorUtil
--- System
jruby 1.6.1 (ruby-1.8.7-p330) (2011-04-12 85838f6) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_35) [linux-amd64-java]
Time: Wed Dec 19 13:57:18 +0000 2012
Server: Apache Tomcat/6.0.35
jruby.home: file:/var/tomcat/webapps/ROOT/WEB-INF/lib/jruby-stdlib-1.6.1.jar!/META-INF/jruby.home

设置这个min / max jruby运行时有什么区别?任何人都可以让我离开这个?

提前致谢。

1 个答案:

答案 0 :(得分:0)

jruby thread safe comparison

在config / warbler.rb

config.webxml.jruby.min.runtimes = 1
config.webxml.jruby.max.runtimes = 1

和config / environments / production.rb

config.threadsafe!