Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Leak in Jruby 1.7.10? #1465

Closed
malletto opened this issue Jan 31, 2014 · 3 comments
Closed

Memory Leak in Jruby 1.7.10? #1465

malletto opened this issue Jan 31, 2014 · 3 comments

Comments

@malletto
Copy link

So I have a bare bones rails app (just rails new testapp), here is my gemfile:

source 'https://rubygems.org'
gem 'rails', '3.2.16'
gem 'activerecord-jdbcmysql-adapter', '1.3.3'
gem 'jruby-rack', '1.1.13.3'
gem 'jruby-jars', '1.7.10'
gem 'jruby-openssl', '0.9.4', :require => false
gem 'warbler', '1.4.0'
group :assets do
gem 'sass-rails', '> 3.2.3'
gem 'coffee-rails', '
> 3.2.1'
gem 'therubyrhino'
gem 'uglifier', '>= 1.0.3'
end

Java 1.7.0_25

Creating an executable war file with:

RAILS_ENV=production bundle exec warble executable war

Fire it off with

java -jar testapp.war

With jruby 1.7.3 the server starts without any problems. With jruby 1.7.10 i get a

Exception in thread "JRuby-Rack-App-Init-2" java.lang.OutOfMemoryError: Java heap space

So i increased my java memory:
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=1024m -XX:PermSize=512m -Xmx4096m -Xms512m"

Start the server again, takes 5 minutes before it fires another out of memory error. Now this is a simple test app, nothing added except gems, log4j and warbler. I would think something this simple should not be throwing memory errors?

@atambo
Copy link
Member

atambo commented Apr 27, 2014

Are you still seeing this issue with newer jruby/java versions? I would also try disabling invokedynamic by using JRUBY_OPTS="-Xcompile.invokedynamic=false".

@chrisseaton
Copy link
Contributor

Are you still experiencing this issue? There's been several releases of JRuby and a major release of Java since then so we should re-examine the problem from scratch if you are.

@kares
Copy link
Member

kares commented Jan 17, 2017

no response for a long time

@kares kares closed this as completed Jan 17, 2017
@kares kares added this to the Invalid or Duplicate milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants