I often see error message such as Communications link failure for saved questions. However after refresh the page, everything went back to normal. If I check the page again after a while (e.g. an hour), the error is back again.
A reasonable assumption is that I have a Metabase instance connecting to MySQL via a proxy, which drops idle connections.
Proposal
Perhaps we can use a connection pool and/or some kind of keep alive query for unstable connections?
We do actually use connection pools to maintain open connections to frequently accessed databases, but it’s entirely possible that since you are using a proxy that the connection is getting dropped by the proxy event though Metabase thinks it’s open.
I’d love to hear more about your configuration so that I could try replicating it and seeing if we can setup an easy work around.
option (A)
metabase (on EC2) connects directly to MySQL instance (RDS which disconnects clients idling for 2+ minutes) option (B)
metabase (on EC2) connects to MySQL via haproxy (which redispatch request upon error)
Is there a reason why in option A the RDS instance disconnects clients after 2 minutes?
We use option A ourselves and we have over a dozen MB instances that we help maintain which are all using that same model and i’ve never had the problem you are describing.
I’m working under a database that is dropping connections after a minute. (Don’t ask, I’ve been down this road already.) Is there any way to adjust that keep alive’s interval?