Lars Kanis <
la...@greiz-reinsdorf.de> writes:
> Is there a firewall between the web- and the database server? They tend
> to consider a connection to be dead after less than 2 hours of idle (the
> Linux default) and drop the connection state information. Which
> keepalive values do you use, now?
Yes, there is a firewall between the servers. I don't know its
specifics, but it was suspected that it might drop idle connections
earlier than usual.
I'm currently setting the following values in the client
connection. Since this is rails, they conveniently go in database.yml:
production:
...
variables:
tcp_keepalives_idle: 60
tcp_keepalives_interval: 60
tcp_keepalives_count: 100
This might result in a lot more keepalives being sent than necessary,
but I doubt that this problematic.