opened
lord-alfred
username_0
Sometimes I see in logs this thing:
```
time="2019-08-22T19:19:46+03:00" level=error msg="There was a problem the insert" error="invalid connection"
...
time="2019-08-22T19:19:46+03:00" level=debug msg="Writing response to client: \n554 Error: could not save email\r\n"
```

I think this is because I have 300 seconds for `wait_timeout` in MySQL and `db.SetConnMaxLifetime` was not set (as we did [here](https://github.com/flashmob/go-guerrilla/pull/176) or advised [here](https://dev.to/aaronellington/importance-of-configuring-go-sqldb-connections-15bc)).

Later I will be able to update guerrilla in production and in a few days I’ll say for sure if this was due. I think this report will be able to help those who will receive the same in the future :)

PS: Maybe you should set the default value in sample config?
invalid connection
issue
closed
lord-alfred
username_0
issue
created
lord-alfred
username_0
A few days later I see that everything is fine.
These errors were due to the lack of settings `sql_max_conn_lifetime` (for `db.SetConnMaxLifetime `).
comment