Closed ghukill closed 6 years ago
Proposing to bump mysql's wait_timeout
to maximum value of 31536000
(1 year).
As not a high volume site, and MySQL no longer high I/O, don't need to worry much about open connections.
With Spark and background tasks both opening connections to SQL, becomes complex to run connection.close()
before anytime it might be accessed. It's outside of the normal Django request/response cycle, which its believed is where connections are opened/closed, and would be complex to address.
Added to Combine-Playbook, updating /etc/mysql/my.cnf
for builds:
[mysqld]
wait_timeout = 31536000
interactive_timeout = 31536000
Given enough time of inactivity, Livy's DB connection will become stale, resulting in failures for any Spark related activities.
e.g.
With the relatively new automatic restarting of Livy, this issue will address stale connections to the database.
Related re: background tasks: https://github.com/WSULib/combine/issues/224