Stack level too deep randomly in production only

1.1k views Asked by At

My production evnvironment every so often throws out a stack level too deep error. The whole thing is life and you can take a look at it here:

http://88.198.198.46/pages/offers

The first time it might work, but after the second or third refresh you will most likely get a 500 error. The log only says:

Started GET "/admin/students" for xx.xx.xx.xx at 2013-08-27 18:35:48 +0200

SystemStackError (stack level too deep):
  actionpack (3.2.14) lib/action_dispatch/middleware/reloader.rb:70

Thats it. Nothing else. My gemfile.lock:

GIT
  remote: git://github.com/engageis/activerecord-postgres-hstore.git
  revision: 5dba5d773bff9eaf77d8126ce5ce67afcad9f548
  specs:
    activerecord-postgres-hstore (0.7.6)
      activerecord (>= 3.1)
      pg-hstore (>= 1.1.5)
      rake

GEM
  remote: https://rubygems.org/
  specs:
    Ascii85 (1.0.2)
    actionmailer (3.2.14)
      actionpack (= 3.2.14)
      mail (~> 2.5.4)
    actionpack (3.2.14)
      activemodel (= 3.2.14)
      activesupport (= 3.2.14)
      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.14)
      activesupport (= 3.2.14)
      builder (~> 3.0.0)
    activerecord (3.2.14)
      activemodel (= 3.2.14)
      activesupport (= 3.2.14)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activeresource (3.2.14)
      activemodel (= 3.2.14)
      activesupport (= 3.2.14)
    activesupport (3.2.14)
      i18n (~> 0.6, >= 0.6.4)
      multi_json (~> 1.0)
    addressable (2.3.5)
    afm (0.2.0)
    arel (3.0.2)
    atomic (1.1.13)
    bcrypt-ruby (3.0.1)
    better_errors (0.9.0)
      coderay (>= 1.0.0)
      erubis (>= 2.6.6)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    builder (3.0.4)
    cache_digests (0.3.1)
      actionpack (>= 3.2)
      thread_safe
    cancan (1.6.10)
    capistrano (2.15.5)
      highline
      net-scp (>= 1.0.0)
      net-sftp (>= 2.0.0)
      net-ssh (>= 2.0.14)
      net-ssh-gateway (>= 1.1.0)
    capistrano-platform-resources (0.1.3)
      capistrano (< 3)
    capistrano-rbenv (1.0.5)
      capistrano (< 3)
      capistrano-platform-resources (>= 0.1.3)
    capybara (2.1.0)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    carrierwave (0.9.0)
      activemodel (>= 3.2.0)
      activesupport (>= 3.2.0)
      json (>= 1.7)
    chronic (0.10.0)
    coderay (1.0.9)
    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.3)
    commonjs (0.2.6)
    cookiejar (0.3.0)
    daemons (1.1.9)
    dalli (2.6.4)
    debug_inspector (0.0.2)
    delayed_job (4.0.0)
      activesupport (>= 3.0, < 4.1)
    delayed_job_active_record (4.0.0)
      activerecord (>= 3.0, < 4.1)
      delayed_job (>= 3.0, < 4.1)
    diff-lcs (1.2.4)
    em-http-request (1.1.0)
      addressable (>= 2.3.4)
      cookiejar
      em-socksify (>= 0.3)
      eventmachine (>= 1.0.3)
      http_parser.rb (>= 0.6.0.beta.2)
    em-socksify (0.3.0)
      eventmachine (>= 1.0.0.beta.4)
    erubis (2.7.0)
    eventmachine (1.0.3)
    execjs (2.0.0)
    factory_girl (4.2.0)
      activesupport (>= 3.0.0)
    factory_girl_rails (4.2.1)
      factory_girl (~> 4.2.0)
      railties (>= 3.0.0)
    faye (0.8.9)
      cookiejar (>= 0.3.0)
      em-http-request (>= 0.3.0)
      eventmachine (>= 0.12.0)
      faye-websocket (>= 0.4.0)
      rack (>= 1.0.0)
      yajl-ruby (>= 1.0.0)
    faye-websocket (0.6.3)
      eventmachine (>= 0.12.0)
      websocket-driver (>= 0.2.0)
    haml (4.0.3)
      tilt
    hash-deep-merge (0.1.1)
    hashery (2.1.1)
    highline (1.6.19)
    hike (1.2.3)
    http_parser.rb (0.6.0.beta.2)
    i18n (0.6.5)
    journey (1.0.4)
    jquery-fileupload-rails (0.4.1)
      actionpack (>= 3.1)
      railties (>= 3.1)
    jquery-rails (3.0.4)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    jquery-ui-rails (4.0.4)
      jquery-rails
      railties (>= 3.1.0)
    json (1.8.0)
    kaminari (0.14.1)
      actionpack (>= 3.0.0)
      activesupport (>= 3.0.0)
    launchy (2.3.0)
      addressable (~> 2.3)
    lazy_high_charts (1.4.3)
      bundler (>= 1.0)
      hash-deep-merge
    less (2.3.2)
      commonjs (~> 0.2.6)
    less-rails (2.3.3)
      actionpack (>= 3.1)
      less (~> 2.3.1)
    libv8 (3.16.14.3)
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.24)
    mini_portile (0.5.1)
    multi_json (1.7.9)
    net-scp (1.1.2)
      net-ssh (>= 2.6.5)
    net-sftp (2.1.2)
      net-ssh (>= 2.6.5)
    net-ssh (2.6.8)
    net-ssh-gateway (1.2.0)
      net-ssh (>= 2.6.5)
    nokogiri (1.6.0)
      mini_portile (~> 0.5.0)
    pdf-reader (1.3.3)
      Ascii85 (~> 1.0.0)
      afm (~> 0.2.0)
      hashery (~> 2.0)
      ruby-rc4
      ttfunk
    pg (0.16.0)
    pg-hstore (1.2.0)
    polyglot (0.3.3)
    prawn (0.12.0)
      pdf-reader (>= 0.9.0)
      ttfunk (~> 1.0.2)
    private_pub (1.0.3)
      faye
    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.14)
      actionmailer (= 3.2.14)
      actionpack (= 3.2.14)
      activerecord (= 3.2.14)
      activeresource (= 3.2.14)
      activesupport (= 3.2.14)
      bundler (~> 1.0)
      railties (= 3.2.14)
    railties (3.2.14)
      actionpack (= 3.2.14)
      activesupport (= 3.2.14)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (>= 0.14.6, < 2.0)
    rake (10.1.0)
    rdoc (3.12.2)
      json (~> 1.4)
    redcarpet (3.0.0)
    ref (1.0.5)
    rspec-core (2.14.5)
    rspec-expectations (2.14.2)
      diff-lcs (>= 1.1.3, < 2.0)
    rspec-mocks (2.14.3)
    rspec-rails (2.14.0)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec-core (~> 2.14.0)
      rspec-expectations (~> 2.14.0)
      rspec-mocks (~> 2.14.0)
    ruby-rc4 (0.1.5)
    sass (3.2.10)
    sass-rails (3.2.6)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    shoulda-matchers (2.3.0)
      activesupport (>= 3.0.0)
    simple_form (2.1.0)
      actionpack (~> 3.0)
      activemodel (~> 3.0)
    spork (0.9.2)
    sprockets (2.2.2)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    therubyracer (0.12.0)
      libv8 (~> 3.16.14.0)
      ref
    thin (1.5.1)
      daemons (>= 1.0.9)
      eventmachine (>= 0.12.6)
      rack (>= 1.0.0)
    thor (0.18.1)
    thread_safe (0.1.2)
      atomic
    tilt (1.4.1)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    ttfunk (1.0.3)
    twitter-bootstrap-rails (2.2.6)
      actionpack (>= 3.1)
      execjs
      railties (>= 3.1)
    tzinfo (0.3.37)
    uglifier (2.2.0)
      execjs (>= 0.3.0)
      multi_json (~> 1.0, >= 1.0.2)
    underscore-rails (1.5.1)
    websocket-driver (0.2.3)
    whenever (0.8.4)
      activesupport (>= 2.3.4)
      chronic (>= 0.6.3)
    xpath (2.0.0)
      nokogiri (~> 1.3)
    yajl-ruby (1.1.0)

PLATFORMS
  ruby

DEPENDENCIES
  activerecord-postgres-hstore!
  bcrypt-ruby (~> 3.0.0)
  better_errors
  binding_of_caller
  cache_digests
  cancan
  capistrano
  capistrano-rbenv
  capybara
  carrierwave
  coffee-rails
  daemons
  dalli
  delayed_job_active_record
  factory_girl_rails
  haml
  jquery-fileupload-rails
  jquery-rails
  jquery-ui-rails
  kaminari
  launchy
  lazy_high_charts
  less-rails
  pg
  prawn
  private_pub
  rails (= 3.2.14)
  redcarpet
  rspec-rails
  sass-rails
  shoulda-matchers
  simple_form
  spork
  therubyracer
  thin
  twitter-bootstrap-rails (= 2.2.6)
  uglifier
  underscore-rails
  whenever

When I try to turn cache.classes = true in my production.rb I get a stack level too deep error immediately after the first request but at a different location:

Started GET "/" for xx.xx.xx.xx at 2013-08-27 04:13:43 +0200

SystemStackError (stack level too deep):
  activesupport (3.2.14) lib/active_support/callbacks.rb:409

Even for the static pages controller which doesnt use any callbacks or any filters at the moment. So I dont know what to do. I might as well trash the entire project because it is suffering from an unfixable bug.

Development works just fine. No errors.

I tried ruby 2.0.0-p0, 2.0.0-p244, 1.9.3-p224, 1.9.3-p448 makes no difference. I tried upgrading/downgrading rails, with no success.

0

There are 0 answers