Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 05 14:45
    MSP-Greg commented #2985
  • Oct 05 14:45
    slondr commented #2985
  • Oct 05 14:43
    MSP-Greg commented #2985
  • Oct 05 12:56
    slondr opened #2985
  • Oct 04 19:06

    dentarg on master

    Rework low level error tests (#… (compare)

  • Oct 04 19:06
    dentarg closed #2980
  • Oct 04 19:05

    dentarg on master

    require securerandom for all te… (compare)

  • Oct 04 19:05
    dentarg closed #2982
  • Oct 04 18:59

    dentarg on master

    CONTRIBUTING: spell out how to … (compare)

  • Oct 04 18:59

    dentarg on ulimit

    (compare)

  • Oct 04 18:59
    dentarg closed #2983
  • Oct 04 15:09

    MSP-Greg on master

    [CI] test files - use unlink in… (compare)

  • Oct 04 15:09
    MSP-Greg closed #2984
  • Oct 03 21:10
    MSP-Greg labeled #2984
  • Oct 03 21:10
    MSP-Greg opened #2984
  • Oct 03 19:13
    dentarg commented #2981
  • Oct 03 19:11
    dentarg edited #2983
  • Oct 03 19:10
    dentarg opened #2983
  • Oct 03 19:07

    dentarg on ulimit

    CONTRIBUTING: spell out how to … (compare)

  • Oct 03 19:02
    MSP-Greg commented #2981
Peter Gao
@peteygao

@danilogarcia024 You might want to (in fact, I highly encourage you to) put long stack traces in a gist (https://gist.github.com) and link to it from here.

The warning is definitely something you want to address. You don't want to have your /usr/local/bin directory to be world readable (permission bits 777). The permissions 755 is much more reasonable for that directory (it says only the owner of that directory can write to it, but other users can read and execute binaries from within it). You can change the permissions via sudo chmod -r 755 /usr/local/bin.

Can't help with debugging Invalid HTTP format without knowing what exactly you're sending the server (do you have a sample curl request?)

Tim Abdulla
@timabdulla
it seems that PERSISTENT_TIMEOUT controls the timeout given to persistent connections, but there is no way to easily modify that variable. i need to increase it to match the keep alive timeout on our load balancers. any way to do this without just overriding the constant?
Evan Phoenix
@evanphx
@timabdulla Yes, there isn't a way o change that right now. I'd be happy to merge a PR that adds the ability to control it in the config file though!
@timabdulla i'm interested in why you need to change it though. Why do you need it to be the same as you load balancers?
raelik
@raelik
I could see it being a problem if his load balancers are configured with a longer timeout
Ryan Condron
@rebelweb
Does anyone have any pointers of setting up puma with runit? Thanks for any help that can be given.
Greg Jastrab
@gjastrab
any tips for debugging all my workers logging "! Detected parent died, dying" ?
https://gist.github.com/gjastrab/37d9e6f201be1be2165f65fad5df0182 is my puma config - we do not preload_app! so that we can do phased restarts
Greg Jastrab
@gjastrab
@rebelweb the repo is slightly old and not much activity, but I had noticed it last year and started exploring using it but never finished getting it across the finish line, it may help though https://github.com/capistrano-runit/puma
Ryan Condron
@rebelweb
I'm have to build something for a omnibus package, I'm using JRuby as well, so I am not sure if this will work but will take a look
Ryan Condron
@rebelweb
I think I have something, I tailored gitlab's unicorn script to puma. This includes erb since it is out of a chef cookbook. I can create a gist , fully compiled if anyone wants an example. https://gist.github.com/rebelweb/4701d91cf79ca78215f561069eeb9d7c
Cheng Zheng
@1c7
why I can't find any great tutorial or document about puma?
really? last message is almost a month ago??
raelik
@raelik
Not sure what you're looking for that you aren't finding in the README on github, or here: http://www.rubydoc.info/gems/puma/3.4.0
raelik
@raelik
@1c7 it's pretty straightforward to use, I'd say 95% of the use cases are covered just in the README.
Greg Jastrab
@gjastrab
@1c7 https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server is a pretty good writeup heroku did after recommending switching from unicorn to puma
raelik
@raelik
@gjastrab Good call, hadn't seen that one.
Andrew A Smith
@aasmith
Hello. I am using puma for multiple workers, not threads (i.e. --workers N --threads 1:1), as each worker is not threadsafe (or at least the work hasn't been done yet to confirm thread safety). My understanding is that if a request in each worker takes one second to complete, and I send in two requests concurrently, each client should have an overall response timing of near to one second. However, it seems that puma is blocking, as these two concurrent requests seem to take nearer to two seconds. Am I misunderstanding something, or is this a bug, or some GIL issue? (this is MRI). Either way, I'd like to understand more :)
I can also produce a small rack-based example of the problem if needed.
Andrew A Smith
@aasmith
(workers N in this case is >= 2).
Andrew A Smith
@aasmith
Digging in further, it seems the same child worker PID is getting selected, even it is unavailable/busy on a current request :/
*even if
Andrew A Smith
@aasmith
OK, so I think the issue is queue_requests being true, combined with only one thread per worker. As I understand, a worker in any state would be selected to handle the request. When there are multiple threads, this issue does not arise. Setting queue_requests to false fixes this.
Should there possibly be a warning raised if threads are 1:1 and queue_requests is true? It seems like this is a bad default in this situation.
raelik
@raelik
If I'm not mistaken, the purpose of queue_requests is to serve as a stand-in if a reverse proxy (such as nginx) is not being used.
Simon
@stoivo
Hello, Is there any migration step to update from 2.11.3 to 3.4.0?
Evan Phoenix
@evanphx
@stoivo Nope, just upgrade it.
Simon
@stoivo
Can't be easier, thanks @evanphx
Anton Antonov
@syndbg
Hi Guys, I'm having some Puma problems. The workers are timing out for no good reason
! Terminating timed out worker: 27501
Jun 28 13:46:54 myapp[26409]: [26409] ! Terminating timed out worker: 27504
Jun 28 13:46:54 myapp[26409]: [26409] ! Terminating timed out worker: 27508
Jun 28 13:46:54 myapp[26409]: [26409] ! Terminating timed out worker: 27513
this happens almost immediately after a restart of the Puma service
the machine resources barely scratch 5%
Anton Antonov
@syndbg
^ scratch the above. The cause was that the database wasn't accessible and Rails couldn't boot in less than the Puma worker timeout setting.
Ryan Condron
@rebelweb
puma is logging all requests as 127.0.0.1 instead of their IP Address I am using the X-Forwarded-For header in nginx, my nginx is custom compiled using chef omnibus if that makes a difference. Trying to debug so my request isn't 127.0.0.1, actual ip is (10.10.20.137). Any pointers?
Ryan Condron
@rebelweb
This message was deleted
Mike Pastore
@mwpastore
@rebelweb You have proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;?
Ryan Condron
@rebelweb
Yes and I am loggin $proxy_add_x_forwarded_for to my nginx log and it is returning a value
ip is 216.x.x.x so it isn't even an internal address.
Mike Pastore
@mwpastore
what version of puma?
Ryan Condron
@rebelweb
3.4.0
one thing unique to me is I am using chef omnibus so everything is compiled manually nginx, ruby, etc.
Mike Pastore
@mwpastore
Are you using ActionDispatch::RemoteIp?
I am just whitelisting ::1 and 127.0.0.1 nothing else
Mike Pastore
@mwpastore
I think something in your middleware is doing the wrong thing. Take a look at this issue on puma/puma: https://github.com/puma/puma/pull/873#issuecomment-178099895
Try adding this to your Puma config: set_remote_address header: "X-Forwarded-For”
Ryan Condron
@rebelweb
I removed all custom middleware
trying the puma configuration change
still seeing 127.0.0.1
Mike Pastore
@mwpastore
can you add like a logger.debug request.env[‘HTTP_X_FORWARDED_FOR’] somewhere in there? (edit: sorry, wrong var name, try that one)