0

Is this possible to specify maximum connection on puma wev server (like in thin etc?). I need to test if this is reason of 502 that comes on some configuration with nginx+puma.

Sławosz
  • 11,187
  • 15
  • 73
  • 106

1 Answers1

1

Max connections is going to be a combination of max puma threads/ ruby version, Max connections from nginx, and max available file descriptors for each.

If you are using MRI you may very well get a timeout error depending on your workload since it can only handle on CPU bound thread at once.

By default puma starts up with a max of 16 threads, so you will not be able to serve more than 16 simultaneous requests, though this really is a lot since your requests should be very fast.

cpuguy83
  • 5,794
  • 4
  • 18
  • 24
  • Actually, I have still some slow requests, and I making high load test using jmeter (more than server can handle). But, I am getting 504 rather than 502. In which conditions I could get 502? You can also point me to interesting code parts, it will make me understand this better. – Sławosz Jul 17 '13 at 11:38