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

config/initializer's are loading multiple time. #1476

Closed
mukeshsinghr opened this issue Feb 3, 2014 · 4 comments
Closed

config/initializer's are loading multiple time. #1476

mukeshsinghr opened this issue Feb 3, 2014 · 4 comments

Comments

@mukeshsinghr
Copy link

mukeshsinghr commented Feb 3, 2014

I have recently updated jruby-jars version from 1.7.3 to 1.7.10. I use to deploy my application as war file on Tomcat using warbler successfully. After upgrade, I have noticed my initializers are loading multiple times.

Following is my Gemfile.lock

GEM
  remote: http://rubygems.org/
  specs:
    actionmailer (3.2.12)
      actionpack (= 3.2.12)
      mail (~> 2.4.4)
    actionpack (3.2.12)
      activemodel (= 3.2.12)
      activesupport (= 3.2.12)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.4)
      rack (~> 1.4.5)
      rack-cache (~> 1.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.2.1)
    activemodel (3.2.12)
      activesupport (= 3.2.12)
      builder (~> 3.0.0)
    activerecord (3.2.12)
      activemodel (= 3.2.12)
      activesupport (= 3.2.12)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activerecord-jdbc-adapter (1.2.9)
    activeresource (3.2.12)
      activemodel (= 3.2.12)
      activesupport (= 3.2.12)
    activesupport (3.2.12)
      i18n (~> 0.6)
      multi_json (~> 1.0)
    arel (3.0.2)
    bouncy-castle-java (1.5.0147)
    builder (3.0.4)
    coffee-rails (3.2.2)
      coffee-script (>= 2.2.0)
      railties (~> 3.2.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.6.2)
    columnize (0.3.6)
    composite_primary_keys (5.0.12)
      activerecord (~> 3.2.0, >= 3.2.9)
    erubis (2.7.0)
    execjs (1.4.0)
      multi_json (~> 1.0)
    hike (1.2.1)
    i18n (0.6.4)
    journey (1.0.4)
    jquery-rails (2.2.1)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    jruby-jars (1.7.10)
    jruby-rack (1.1.13.1)
    json (1.8.1-java)
    mail (2.4.4)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.21)
    multi_json (1.7.2)
    newrelic_rpm (3.7.1.182)
    polyglot (0.3.3)
    rack (1.4.5)
    rack-cache (1.2)
      rack (>= 0.4)
    rack-ssl (1.3.3)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (3.2.12)
      actionmailer (= 3.2.12)
      actionpack (= 3.2.12)
      activerecord (= 3.2.12)
      activeresource (= 3.2.12)
      activesupport (= 3.2.12)
      bundler (~> 1.0)
      railties (= 3.2.12)
    railties (3.2.12)
      actionpack (= 3.2.12)
      activesupport (= 3.2.12)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (>= 0.14.6, < 2.0)
    rake (10.0.3)
    rdoc (3.12.2)
      json (~> 1.4)
    ruby-debug (0.10.4)
      columnize (>= 0.1)
      ruby-debug-base (~> 0.10.4.0)
    ruby-debug-base (0.10.4-java)
    rubyzip (0.9.9)
    sass (3.2.7)
    sass-rails (3.2.6)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    sprockets (2.2.2)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    therubyrhino (2.0.2)
      therubyrhino_jar (>= 1.7.3)
    therubyrhino_jar (1.7.4)
    thor (0.17.0)
    tilt (1.3.6)
    treetop (1.4.12)
      polyglot
      polyglot (>= 0.3.1)
    tzinfo (0.3.37)
    uglifier (1.3.0)
      execjs (>= 0.3.0)
      multi_json (~> 1.0, >= 1.0.2)
    warbler (1.4.0)
      jruby-jars (>= 1.5.6)
      jruby-rack (>= 1.0.0)
      rake (>= 0.9.6)
      rubyzip (>= 0.9, < 1.1)

PLATFORMS
  java

DEPENDENCIES
  activerecord-jdbc-adapter
  bouncy-castle-java
  coffee-rails (~> 3.2.1)
  composite_primary_keys (= 5.0.12)
  jquery-rails
  newrelic_rpm
  rails (= 3.2.12)
  ruby-debug
  ruby-debug-base
  sass-rails (~> 3.2.3)
  therubyrhino
  uglifier
  warbler
@atambo
Copy link
Member

atambo commented Apr 27, 2014

Are you still seeing this issue with newer versions of jruby? I've never seen this bug before and I run a rails 3.2 app using jruby 1.7.11. Maybe it is one of your dependencies causing the issue?

@mukeshsinghr
Copy link
Author

@atambo Yes, I tried it again. I migrated my application lib from jruby-1.7.3 to 1.7.18. My application runs as expected when I run it in development environment with webrick server using App>jruby -S rails server. This works excellent and gives me expected behavior.

Above mentioned problem comes, when i create war file and deploy it in the tomcat server. It gets deployed successfully when I open my application home URL from the browser. I see on the tomcat console it loads the config\initializers* files multiple times. Opens application home page. Due to this application becomes unresponsive and throws error java.lang.OutOfMemoryError: Java heap space

In case any more details required, please let me know.

Note: My application works perfectly fine with my current lib ie jruby-1.7.3 in all environments.

@headius
Copy link
Member

headius commented Jan 17, 2017

@mukeshsinghr If you are still out there and interested in helping solve this, bisecting commits between 1.7.3 and 1.7.4 (or whatever release starts to break for you) would help us narrow it down. Of course, if you're still out there and haven't tried a recent 1.7 (1.7.25 is current) or moved to 9k, we'd strongly recommend that first.

@enebo
Copy link
Member

enebo commented Feb 17, 2017

@mukeshsinghr if you are still around reopen this. I am speculatively closing because 1.7.x is EOL'ing soon and there was some serious issues with resolving resources during the period you reported.

@enebo enebo closed this as completed Feb 17, 2017
@enebo enebo added this to the Invalid or Duplicate milestone Mar 6, 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

5 participants