Jason Fleetwood-Boldt
2014-Nov-20 15:56 UTC
Mysql2::Error: This connection is still waiting for a result, try again once you have the result
Rails-talk, Last night I got a slew (around 2000) of these exceptions raised in my production app between 4:03 AM and 7:30 AM (eastern time). They all had the same pattern: ActiveRecord::StatementInvalid: Mysql2::Error: This connection is still waiting for a result, try again once you have the result: SELECT `spree_buckets`.* FROM `spree_buckets` WHERE `spree_buckets`.`slug` = 'gallery' LIMIT 1 (The SQL query was different for many, but the Mysql2::Error: This connection is still waiting for a result, try again once you have the result part was the same) I called Amazon RDS support and they said the underlying database looked fine, we are well below our IOPS threshold, and our queue depth looks healthy. I think perhaps just 1 Unicorn worker choked up with a single MySQL call, resulting in all subsequent calls from that Unicorn worker to produce this error (for 3 hours!) Does anyone else have any best practice advice for this error? Should I simply catch for this exception and close & reconnect any active MySQL connections ? Can someone share some examples of how to do that as cleanly as possible? Thanks, Jason ---- Jason Fleetwood-Boldt tech-eJ8lBn5LdNBhbmWW9KSYcQ@public.gmane.org http://www.jasonfleetwoodboldt.com/writing -- 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 rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0C92E483-8F51-4AAF-A210-D5243246CE6C%40datatravels.com. For more options, visit https://groups.google.com/d/optout.