1

I have a rack puma server hosted, and there are multiple HTTP request-response cycles. I'm querying the data from MongoDB. Quite often the server hangs, and if I press Ctrl+C it resumes , if i don't then after a couple of minutes I get the following error: C:/Rubies/Ruby193/lib/ruby/gems/1.9.1/gems/puma-1.6.3/lib/puma/client.rb:127:in 'readpartial': An existing connection was forcibly closed by the remote host. (E rrno::ECONNRESET)

I have pretty good exception handling and loggers, but this is not caught anywhere. I have to restart the server again to proceed.

Please suggest.

Tejaswini
  • 56
  • 7
  • You're using a very old version of both Puma and Ruby. Upgrade to the latest versions and then make a new post if you still have the same problem. Otherwise people here might spend time solving a bug in Puma which is already fixed. The newest version is 3.6.0. You're on 1.6.3. – Casper Oct 17 '16 at 06:04
  • Will there be a dependency on the mongo driver? OR As an alternative, can I just upgrade Puma instead of Ruby entirely? – Tejaswini Oct 17 '16 at 06:13
  • 1
    You can try, but I doubt you can upgrade one part without needing to upgrade the rest. I think Puma dropped support for Ruby 1.9 in the latest versions. You could try to upgrade to 2.0 maybe, instead of 3.6, and see if that would work. Btw. the error you posted it might be worth posting the whole call stack if it's available, just in case there might be something there worth seeing. – Casper Oct 17 '16 at 06:20
  • Pick your versions: https://rubygems.org/gems/puma/versions – Casper Oct 17 '16 at 06:22
  • 1
    2.16.0 seems like a good candidate. It probably runs on Ruby 1.9 too. – Casper Oct 17 '16 at 06:23
  • Thanks! I'm currently upgrading Ruby to the latest version. Will update once done. – Tejaswini Nov 02 '16 at 07:00

0 Answers0