Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 06 11:29
    keisukeYamagishi commented #2718
  • Dec 06 10:19
    dentarg commented #2762
  • Dec 06 10:18

    dentarg on master

    Add SIGINFO to documentation (#… (compare)

  • Dec 06 10:18
    dentarg closed #2762
  • Dec 06 10:11
    fschwahn commented #1320
  • Dec 06 10:11
    fschwahn opened #2762
  • Dec 06 09:31
    dentarg commented #1320
  • Dec 06 09:11
    fschwahn commented #1320
  • Dec 01 09:39
    jdelStrother commented #2756
  • Dec 01 09:39
    jdelStrother commented #2756
  • Dec 01 09:39
    jdelStrother commented #2756
  • Dec 01 09:38
    jdelStrother commented #2756
  • Dec 01 09:38
    jdelStrother commented #2756
  • Nov 25 18:19
    jacobherrington opened #2761
  • Nov 24 17:39

    MSP-Greg on master

    [CI] OpenSSL 3.0 - Fix error me… (compare)

  • Nov 24 17:39
    MSP-Greg closed #2760
  • Nov 24 17:06
    MSP-Greg labeled #2760
  • Nov 24 17:06
    MSP-Greg labeled #2760
  • Nov 24 17:04
    lucaskanashiro commented #2760
  • Nov 24 17:03
    lucaskanashiro synchronize #2760
Cameron Seebach
@cseebach-lh
@collimarco_twitter If you're okay with HAProxy helping out with slow clients, there appears to be some configuration you can do there: https://www.haproxy.com/blog/what-is-a-slow-post-attack-and-how-turn-haproxy-into-your-first-line-of-defense/
Cameron Seebach
@cseebach-lh
@evanphx Is there a channel for puma-dev issues? I'm experiencing problems that are almost certainly related to the configuration of my machine and not to puma-dev, so I'm reluctant to file an issue on GitHub
Brian Purgert
@BrianPurgert
Does puma create a seperate process for each request,
Blane Dabney
@raelik
@BrianPurgert No, it has a set number of threads and/or workers that field the requests
Chris
@ipatch

@raelik just curious but what advantage is there to setting the worker # to something other than 0

when I deploy a rails app using cap & puma I have the below line in my deploy.rb

set :puma_workers,    0
Brian Purgert
@BrianPurgert
@raelik
Blane Dabney
@raelik
@ipatch If you're using jRuby, there isn't one, and in fact, you can't.
If you're using MRI, you can better utilize multiple cores, since MRI doesn't have truly native threads
But, since ruby 1.9 (2.0 maybe?), the I/O is handled internally using native threads, so the typical use cases of threads that wait on I/O will tend to run concurrently even with the GIL locking the green threads.
So I don't think on modern ruby versions there's much use for having multiple workers.
I think if you're doing something more CPU intensive in your Rack app, you may want multiple workers.
Chris
@ipatch
@raelik definitely not using jRuby, all my rails apps are currenty using rvm ruby 2.3.1 love song
Blane Dabney
@raelik
@ipatch Right, so long as your rails apps aren't servicing long-running requests, I think just having a single worker with your threads set appropriately is enough.
Chris
@ipatch
@raelik by single worker you mean cap / puma begins its index at 0 and not 1 ?
Blane Dabney
@raelik
But if you start doing odd things (like say... handling persistent websocket requests), you shouldn't need to use the worker model
Technically, in the case of setting workers, 0 and 1 are effectively the same
0 means you're disabling the worker model entirely.
Chris
@ipatch
ohhh, that i didn’t know, thanks for the explanation 👍
Blane Dabney
@raelik
But setting it to 1 means you're only using 1 worker... so you aren't taking advantage of the worker model. But you also aren't actually disabling it entirely.
Chris
@ipatch
interesting, so the worker model works in conjuction with the threading nature of ruby?
Blane Dabney
@raelik
Pretty sure of that anyway. It's been so long since I've used the worker model
The worker model is actually a way to work around the limited threading in MRI
since it spins up multiple processes.
Chris
@ipatch
hmmm, so workers are new system processes spawned by puma?
Blane Dabney
@raelik
But that became less necessary in ruby 1.9
yes.
Chris
@ipatch
ahhh, that makes sense
Blane Dabney
@raelik
jRuby uses native Java threads, so the worker model is actually permanently disabled if you're using jRuby and Puma (which is my typical use case)
Chris
@ipatch
thanks for the explanation i’ll buy you a cup of ☕️ or 🍺 next time your in town.
Blane Dabney
@raelik
:+1:
Johnathon E Wright
@mustmodify
Just FYI, I had an invalid path for the second argument to stdout_redirect and puma was failing silenty. Quitting silently, I guess.
Blane Dabney
@raelik
@mustmodify what puma version?
you should have seen Cannot redirect STDERR to <your invalid path> in the puma error log
Blane Dabney
@raelik
Oh, I think I see what might be the issue there. That exception will get swallowed depending on how you start Puma
Brian Purgert
@BrianPurgert
Starting puma automatically?
I
How do
L
Brian Purgert
@BrianPurgert
**How do I start puma automatically, aka what is the recommended method? Ive just been running puma in a screen session.
Blane Dabney
@raelik
@BrianPurgert that's completely dependent on your system, deployment strategy, etc.
You might make an init.d script, or a systemd service, or could be a monit config, a line in /etc/rc.local, a launch daemon plist file (for OS X), etc etc
adamjbradley
@adamjbradley
Howdy all!
Emba Moussa
@embasbm
hi, anyone hit the wall with ubuntu 16.04?
Blane Dabney
@raelik
?
Jonathan Boler
@jboler_gitlab
Does anyone run puma on jRuby using JVM server mode?
As far as I can tell puma defaults to running in JVM client mode and I can't find anything online about running it in server mode
Something like jruby --server $(which puma)
Jonathan Boler
@jboler_gitlab
After further research it looks like everything on 64bit is run in server mode these days
David Blewett
@davidblewett
I'm having trouble configuring Puma to accept connections from rust client code (using the rustls crate). No matter what I try, I end up with: #<Puma::MiniSSL::SSLError: OpenSSL error: error:1408A0C1:SSL routines:ssl3_get_client_hello:no shared cipher - 336109761>