Re: [Maria-discuss] Aborted connection (CLOSE_CONNECTION)

This always shows the global value: SHOW VARIABLES LIKE ... This always shows the current session value: SHOW SESSION VARIABLES LIKE ... Global value is read from the files when the server starts, and later can be changed with SET GLOBAL var = val. Session value is copied from global value when the session starts (so changing the global value doesn't affect existing sessions) and can later be changed with SET var = val. In other words, the global value is important because it is used by all new sessions by default, but the session value is what really takes effect. I beleive that your application sets a session value. Federico -------------------------------------------- Mer 30/11/16, Florent B <florent@coppint.com> ha scritto: Oggetto: Re: [Maria-discuss] Aborted connection (CLOSE_CONNECTION) A: "Federico Razzoli" <federico_raz@yahoo.it>, maria-discuss@lists.launchpad.net Data: Mercoledì 30 novembre 2016, 10:44 Ok, I found the problem thanks to you Federico. On Debian, mysql-common package provided by MariaDB repository contains "wait_timeout = 600" in my.cnf. This is not the default value specified in documentation (28800). And when I use "mysql -u root -p -h my_host" command to show variables, the default value is displayed (28800), I never saw 600 in here ! Why ? But displaying variables in my PHP app showed me that wait_timeout was effectively set to 600. Setting wait_timeout=28800 in a config file in /etc/mysql/conf.d directory fixes this. Should we consider "wait_timeout = 600" in my.cnf as a bug ? That's not default value... On 11/29/2016 11:17 PM, Federico Razzoli wrote:
Interesting. A couple ideas:
But this time,
'%timeout%'; this should be executed by PHP, using the same library used by the application. Why? To check if a library changes a timeout at session level.
2 Have you checked if
your application reconnects N times? For example, 600 could be a 60 seconds timeout * 10 attempts.
Federico
--------------------------------------------
Oggetto: Re: [Maria-discuss] Aborted connection (CLOSE_CONNECTION)
mysqlnd.net_read_timeout = 31536000
_______________________________________________

On 30/11/2016 15:13, Federico Razzoli wrote:
This is not correct. SHOW VARIABLES shows the session value: SET GLOBAL wait_timeout=601; SET SESSION wait_timeout=599; SHOW SESSION VARIABLES LIKE 'wait_%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | wait_timeout | 599 | +---------------+-------+ SHOW GLOBAL VARIABLES LIKE 'wait_%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | wait_timeout | 601 | +---------------+-------+ SHOW VARIABLES LIKE 'wait_%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | wait_timeout | 599 | +---------------+-------+
participants (2)
-
Federico Razzoli
-
Ian Gilfillan