views:

34

answers:

1

We have two data centers located across the globe. if we run the rails app in one datacenter and point to the database located in the other data center. The app throws

MySQL server has gone away

like once in every 5-6 web request. and show 5000 internal server error

but if we put both the app and the mysql db in the same datacenter. it runs just fine. It appears to be some latency issue. maybe some timeout or reconnection to the database required. But not sure how to fix it. Any help appreciated.

A: 

You should take a look on this post: http://stackoverflow.com/questions/100631/mysql-server-has-gone-away-with-rails

Vlad Zloteanu
yeah, i read that. but am not sure how exactly it applied to my case. cos the app worked fine when app and database were in the same machine. and it didnt happen when the app was not accessed for hours. it happening. once in every 5 request.
railscoder