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:
1 Try this query: SHOW SESSION VARIABLES LIKE
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
--------------------------------------------
Mar 29/11/16, Florent B <florent@coppint.com> ha scritto:
Oggetto: Re: [Maria-discuss] Aborted connection (CLOSE_CONNECTION)
A: "Reindl Harald" <h.reindl@thelounge.net>, maria-discuss@lists.launchpad.net Data: Martedì 29 novembre 2016, 12:22 On 11/29/2016 12:03 PM, Reindl Harald wrote: >
> Am 29.11.2016 um 11:49 schrieb Florent B: >> For example, if I try this in PHP:
>> 1/ Connect to mariadb >> >> 2/ sleep 610 seconds
>> 3/ ping mariadb
>> => I got Server has gone away error. >>
With a 590 sleep time, no error. >> >> I use MariaDB 10.1, didn't change any "timeout" value in MariaDB : >> interactive_timeout & wait_timeout are 28800 > > http://php.net/manual/en/mysqlnd.config.php#ini.mysqlnd.net-read-timeout > Hi, and thank you. But I cannot find any timeout of 600 seconds... default_socket_timeout = 60
mysqlnd.net_read_timeout = 31536000
And I have the exactly same problem using this algorithm in Python, it's not related to PHP...
Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp