[RADIATOR] mysql DBI timed out connections and too many open files (sockets)

Rauno Tuul raunz at hot.ee
Thu Apr 20 12:39:22 UTC 2017


Hi,

Excellent answer - that I was looking for.
To keep things under control, all I have to do, is to increase Authby
SQL Timeout value (e.g. 6 sec) and add to each DBSource a
mysql_connect_timeout parameter with slightly smaller value (e.g. 4 sec).

As it turned out, tuning generic Timeout in AuthBy SQL to small values,
has some undesired sideeffects. But with assistance from MySQL driver
options, outages can be avoided.

Thank You!

-- 
rauno

On 20.04.2017 14:34, Tuure Vartiainen wrote:
> I was now able to reproduce the problem which is caused by MySQL DB driver 
> (libmysqlclient18 in Debian) leaving file handles open when a connect operation 
> is interrupted by SIGALRM signal (generic Timeout in AuthBy SQL).
> 
> You can fix it by defining a timeout value for MySQL driver in DBSource, 
> e.g.
> 
> DBSource   dbi:mysql:dbname:127.0.0.1:3310;mysql_connect_timeout=<seconds>
> 
> where the value is smaller than Timeout value used in AuthBy SQL.
> 
> 
> Different MySQL driver options can be found from
> 
> https://metacpan.org/pod/DBD::mysql#Class-Methods


More information about the radiator mailing list