GithubHelp home page GithubHelp logo

Comments (10)

tommeier avatar tommeier commented on May 18, 2024

I'm also experiencing this, took forever to narrow down, glad to see someone else is getting this too!

from activerecord-session_store.

nathany avatar nathany commented on May 18, 2024

From rails/rails#14031. I've spent a few man-days tracking down a production logging issue which turns out to be this.

I have a demo app for the issue. https://github.com/GetJobber/logging_example

If I comment out the 3 calls to logger.quietly the issue is solved in the example app.

Looking for the alternative to logger.quietly or if it can just be removed.

from activerecord-session_store.

harikrishnan83 avatar harikrishnan83 commented on May 18, 2024

I am facing this issue too with Puma on MRI. I am trying out below Gist by @kares.
https://gist.github.com/kares/9374772

from activerecord-session_store.

nathany avatar nathany commented on May 18, 2024

@harikrishnan83 Or you can use this fork #22 rather than monkey patching silence.

from activerecord-session_store.

harikrishnan83 avatar harikrishnan83 commented on May 18, 2024

Thanks @nathany. I will try it.

from activerecord-session_store.

tommeier avatar tommeier commented on May 18, 2024

I'm using this as an initialiser thats doing the job (this is not with puma though, we only face issues with multiple threaded tests etc): https://gist.github.com/tommeier/9845210

from activerecord-session_store.

tommeier avatar tommeier commented on May 18, 2024

Also, the concensus on rails itself is to remove these methods entirely: rails/rails#13139 but I wasn't sure at the time the best way to resolve tests as it is being used by multiple 'sub' projects and no shared logic seems to exist yet.

from activerecord-session_store.

sikachu avatar sikachu commented on May 18, 2024

I've implemented the fix for both thread safety issue and quietly deprecation and pushed out a prelease gem. Would you mind testing out 0.1.1.pre and report back if you still run into any issue?

Thanks!

from activerecord-session_store.

sikachu avatar sikachu commented on May 18, 2024

I'm going to release 0.1.1 which should contain the fix. If this is still an issue, please let me know so I will reopen the issue. Thank you for your patience.

from activerecord-session_store.

alexandermalfait avatar alexandermalfait commented on May 18, 2024

Thanks for the fix! This issue was completely crashing my JRuby application.
All requests would fail with this stack trace:

Errno::EBADF (Bad file descriptor - Bad file descriptor):
  org/jruby/RubyIO.java:2097:in `close'
  activesupport (4.1.4) lib/active_support/core_ext/kernel/reporting.rb:51:in `silence_stream'
  activesupport (4.1.4) lib/active_support/core_ext/kernel/reporting.rb:104:in `quietly'
  activerecord-session_store (0.1.0) lib/action_dispatch/session/active_record_store.rb:77:in `set_session'
  rack (1.5.2) lib/rack/session/abstract/id.rb:342:in `commit_session'
  rack (1.5.2) lib/rack/session/abstract/id.rb:226:in `context'
  rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'

Updating activerecord-session_store to ~> 0.1.1 fixes the issue.

from activerecord-session_store.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.