We are running a jruby/rails app under tomcat, and can not immediately make the shift to threadsafe due to some of the components we are using. In the interim we plan to set jruby.runtime.min and jruby.runtime.max to prevent perm-gen out of memory errors. Unfortunately this will throttle the number of concurrent users to a fairly small number, so my question is when does the runtime get recycled? Is it session based or something else. Would lowetring session timeout help to speed up the availability of pools or is there more to it than that. Any links to better understand the specifics of how jruby runtime works would be appreciated.
jruby runtimes and tomcat
343 Views Asked by d-coded At
1
There are 1 best solutions below
Related Questions in TOMCAT
- Unable to compile the class for JSP in tomcat 8.5.95
- detect catalina.out log path from a running tomcat on non-Windows
- Tomcat 9.0.80 with Open JDK (JRE only) v16.0.2 crashing/unresponsive several times a day with load: Thread Count hits Max and All Threads are Busy
- JAX-RS webapp deployed to Tomcat returns HTTP 404 error while it works fine in Eclipse
- Illegal access: this web application instance has been stopped already. Could not load [org.apache.logging.log4j.message.SimpleMessage]
- File Upload Handling: Inconsistent HTTP Response Codes for Different File Sizes with Exception in Tomcat
- Don't get any public folder when deployment in svelte kit app
- Accessing solr web interface behind reverse proxy returns "Content Encoding Error"
- java.lang.UnsatisfiedLinkError: org.apache.tomcat.jni.SSL.renegotiatePending(J)I
- Cannot decrypt the password in application.yml properly if war file in the tomcat/webapps
- how to deploy mock json data api's(json-server) and angular 17 application in apache tomcat server 9 version
- version compatibility issue between spring boot, struts2-core and tomcat-embed-jasper in web application
- Is there any possibility to use JTA with Spring Framework 6 and Tomcat or Payara?
- Eclipse issue with publishing to Tomcat server
- null in Camunda variables
Related Questions in JRUBY
- Error while doing bundle install with jruby
- jruby-jms-1.3.0-java gem create_destination method throws error "undefined method `java_kind_of?
- How to use csv converter encoding in ruby?
- Unable to run hbase shell in Mac
- Undefined method for nil:NilClass in JRuby
- Calling Java method doesn't work after upgrading jruby 9.2.11 to 9.3.0.0
- Form attribute :required => true missing from html output in production
- Intermittent connection refused error from Puma (Jruby version)
- OpenSSL error when installing JRuby with rbenv on MacOS
- JRuby can not call Java method
- Sanitizing encoding errors on input data in jruby
- JRuby ambiguous methods
- JRuby call Method from Java
- How to connect to SQLite3 database in JRuby?
- Extending (monkey patching) Java classes in Truffle Ruby
Related Questions in JRUBYONRAILS
- Error while doing bundle install with jruby
- jruby 9.3.4.0 NoMethodError: undefined method `new_ostruct_member' for No value for 'public' found
- what should be Ruby Safe navigator expression for account["details"]["name"]?
- No Route Matching in rails 6 for multiple route parameters
- direct upload using active storage in rails - input.dataset.directUploadUrl "undefined"
- Ruby Convert a Java Byte Buffer object to String
- Jruby version suitable for OpenJDK 8 (Zulu JDK)
- JRuby - query result is converted to String instead of Date
- How to pass changed values from text_field_tag to the controller
- make: *** No rule to make target '~/.rvm/rubies/jruby-9.2.0.0/lib/ruby/include/ruby/ruby.h', needed by 'amatch_ext.o'.
- How do I force warbler to use a specific version of jruby?
- JRuby Rails Console hanging on "Switch to inspect mode"
- NameError: uninitialized constant ActiveRecord::ConnectionAdapters::MysqlAdapter while starting rails server
- NoMethodError: undefined method `type_cast_config_to_integer' for ActiveRecord::ConnectionAdapters::Mysql2Adapter:Class
- Compiled Jruby application Instance variable error
Related Questions in JRUBY-RACK
- Debug JRuby rack runtime error in tomcat
- How to deploy multiple instances of same Rails application in same tomcat
- Failed to deploy sinatra web app to weblogic 12
- Sessions not working in Sinatra app when packaged with warbler
- deploying ruby + sinatra app on google appengine
- jruby runtimes and tomcat
- Simplest way to have trinidad depend on an alternate version of jruby-rack?
- Performance of sinatra app on jruby
- How to configure custom servlet in Jruby-rack?
- What is the preferred way to run Sinatra application?
- Multiple war web applications in ear with JRuby rack
- Dependency Issues Running a JRuby Thread
- Building .war with JRuby and warbler
- Padrino & Trinidad undefined method `register' for Rack::Handler:Module
- Warbler 1.3.2 not acknowledging Gemfile dependencies
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
first of all there's a bit of confusion in the q - setting min/max runtime parameters will not prevent perm-gen errors ... you will likely need to increase memory a bit (depending on your application's footprint) as you're seeing those esp. if you're setting min/max values higher.
secondly - it will sure throttle concurrency but not that much - think of it as mongrel (thin) cluster: concurrent requests handled >= the number of running instances
a single runtime is blocked for the duration of a single request (does not depend at all on any session state), after the response is returned the runtime is returned to the pool and is ready to handle another requests. if a request comes in and there's no runtime in the pool it will try to wait for one to become available before returning a HTTP error (can be configured using jruby.runtime.acquire.timeout).
I would recommend to run or at least (integration) test with min = max since booting a runtime on demand might be costly (yet again this is application dependent) and at the same time it's harder to guess your memory requirement when you boot up a Rails instance on demand while serving. be aware that it might take a while to boot since your application needs loading on deploy min-times.