splashblot / dronedb

Location Intelligence & Data Visualization tool
http://carto.com
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

500 error due to connection to database broken #99

Closed ivanprado closed 6 years ago

ivanprado commented 6 years ago

Context

Accessing tileo.co or tileo-beta.co after some time of inactivity raises 500 status code responses due to broken database connection, even if conn_validator_timeout is set to something reasonable (120 seconds). The kind of errors you can see at Rollbar contain the following message:

PG::Error: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.

Steps to Reproduce

Wait some time without nobody using the platform, and access any page.

Current Result

500 HTTP response.

Expected result

Page shown.

Additional info

I have almost discarded that the problem is due bad configuration of Sequel connection validator.

After some investigation my feeling is that it is related with docker swarm. Probably some kind of network problem in that mode. Some of the following could be generating the problem:

apercas commented 6 years ago

Seems to been have solved after updating production environment after updating Docker.