1

The most common reason for the MySQL server has gone away error is that the server timed out and closed the connection.

https://dev.mysql.com/doc/refman/8.0/en/gone-away.html

There is a table with two columns/rows (CR_SERVER_GONE_ERROR and CR_SERVER_LOST) which I'm not sure how to configure MariaDB to log?

My question is how do I configure MariaDB to log information I need to know if a connection times out or another cause?

This error has only occurred once and I would like to create a condition to test a timeout if possible.

1 Answer 1

0

You need to enable your MySQL log_error and look there for clues. In the vast majority of cases this is due to one of the following:

1) Session was idle for too long - check wait_timeout and interactive_timeout variables.

2) mysqld OOM-ed (ran Out Of Memory) and the thread was killed.

3) mysqld crashed (usually a bug)

4) Something between you and the server caused a TCP connection reset.

In all cases, there should be something in the error log.

1
  • Great, thanks for posting. I'll try this out this weekend. :-) Commented May 8, 2020 at 13:45

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.