Coder Social home page Coder Social logo

Comments (7)

evanphx avatar evanphx commented on April 28, 2024

@headius Any thoughts on this?

from puma.

jrochkind avatar jrochkind commented on April 28, 2024

While I'm not sure if it can be responsible for that kind of 'malloc' exception, I suspect you really need to set config.threadsafe! in a rails app used with puma, no? Otherwise puma is going to be sending overlapping concurrent requests to the same rails app instance (right?), but rails is not neccesarily running such that request/action processing is actually threadsafe for this use.

(On the other hand, I'm not entirely sure what config.threadsafe! actually does under the hood these days, it might not actually do anything important. but it (or the other config variables it triggers, like config.allow_concurrency) is documented to be neccessary for concurrent overlapping request processing. Search for threadsafe! in http://guides.rubyonrails.org/configuring.html)

You might want to see if this is still reproducible with config.threadsafe!. And puma README probably ought to say in the Rails section that you want to config.threadsafe! (as well as be sure you aren't doing anything in app code that's not threadsafe under concurrent request handling)

from puma.

bporterfield avatar bporterfield commented on April 28, 2024

I saw the malloc error when I used the puma gem direct from github with bundler. After some poking around I realized that bundling using git (gem 'puma', :git => https://github.com/puma/puma.git) does not build the java extension - it only builds the c extension. Forking the gem myself, building the java extension manually, and pointing bundler at my local path (gem 'puma', :path => ~/stuff/puma) resolved the issue. I'm guessing that Jruby's experimental c compilation stuff actually kinda worked, and that's why the error isn't consistent?

When puma 1.0 was released, the java platform gem was not pushed right away (#49) so a re-install of the gem may be all you need.

from puma.

headius avatar headius commented on April 28, 2024

Would be nice for someone to file a separate bug for either Puma or Bundler to get the git repo to build the java version properly under that Gemfile setup.

from puma.

bporterfield avatar bporterfield commented on April 28, 2024

Re-opened issue #42 I had closed previously: #42

from puma.

sorentwo avatar sorentwo commented on April 28, 2024

Was this issue essentially covered by issue #42 ? If so can this be closed?

from puma.

evanphx avatar evanphx commented on April 28, 2024

Closing since it seems to be stale.

from puma.

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.