Rails threads hang in ActiveRecord database call when using Puma server
|Added at||2016-12-22 06:12|
I'm new to Rails and trying to code an implementation where web service queries are run in parallel using celluloid-pmap in Puma. In doing that Rails server hangs at ActiveRecord database calls. I don't receive any error messages. The threads hang at the very first database call. I found that the same piece of code executes perfectly in 'rails console'.
I also found that I face the same hanging issue when I use Ruby threads. I use Rails 22.214.171.124 and Ruby 2.3.1. Here's a modified code snippet from my server code using threads in Puma.
I have my config/puma.rb file set to:
Any pointers to resolve this will be very helpful.