If you're running MySQL, this is a very common issue. Sometimes your database server might be closing the connection because the connection is "sleeping", you can solve this by either adding
"autoReconnect=true" to your sql arguments in the
config.yml or you can enable the
closeoption in the
config.yml to close connections after every few minutes and open a new one.