Answer the question
In order to leave comments, you need to log in
Why after some time of idle connection to MySql server there is an error at request?
I use the MySql API for C. Everything connects fine and all requests are correctly sent, but if I wait 2-3 days without sending requests to the database, and then still send the request, I get an error from the API:
CDK Error: no such file or directory (generic:2)
As far as I understand, somewhere there is a setting responsible for the maximum lifetime of a session (or its activity in the query plan). What needs to be changed so that even after a long period of inactivity, it can still send requests correctly?
I found several properties that are possibly related to this:
interactive_timeout
wait_timeout
Answer the question
In order to leave comments, you need to log in
It is better not to increase the lifetime of the connection, but to check its activity and reconnect.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question