I'm trying to set-up a remote database for my Rails application
(mysql-server running on separate VM). My host (Azure) has an idle-timeout
setting of 4 minutes on all TCP connections. Because of that, if a Rails
process is idle for more than 4 minutes, the connection hangs. The process
holding the connection (Unicorn, Sidekiq) also hangs.
The backtrace shows that the process is stuck at *ping* -
`block in checkout_and_verify'
For now I have implemented a sort of heat-beat that keeps the
Unicorns/Sidekiq connections alive, but I feel its fragile. I wonder if
there is a way here to tell from the Rails side that the connection has
gone? Or may be apply some kind of timeout on *ping* itself ?
Please share any ideas or suggestions this.
Thanks in advance,
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.