David Hoover wrote:
I am using MySQL as the backend database. If I leave a Galaxy browser session sitting for more than 30 minutes, the MySQL connection goes to sleep. Then, when I try some action, there is an error displayed on the browser window and in the logfile.
It looks something like this:
Error - sqlalchemy.exc.OperationalError: (OperationalError) (2013, 'Lost connection to MySQL server during query') u'SELECT galaxy_session.id AS galaxy_session_id, galaxy_session.create_time AS galaxy_session_create_time, galaxy_session.update_time AS galaxy_session_update_time, galaxy_session.user_id AS galaxy_session_user_id, galaxy_session.remote_host AS galaxy_session_remote_host, galaxy_session.remote_addr AS galaxy_session_remote_addr, galaxy_session.referer AS galaxy_session_referer, galaxy_session.current_history_id AS galaxy_session_current_history_id, galaxy_session.session_key AS galaxy_session_session_key, galaxy_session.is_valid AS galaxy_session_is_valid, galaxy_session.prev_session_id AS galaxy_session_prev_session_id \nFROM galaxy_session \nWHERE galaxy_session.session_key = %s AND galaxy_session.is_valid = %s \n LIMIT 0, 1' ['911e5446281a234467a4812eab1cad30', 1]
I have seen this sleeping problem for other applications that use MySQL. There are couple of ways to fix this. The simplest is to capture the MySQL error and retry the operation if the error is 'Lost connection'. Another is to continuously 'ping' the MySQL server periodically with very short requests.
Does anyone have a fix for this problem, or am I the first to notice this?
Hi David, To fix this, uncomment the following parameter in universe_wsgi.ini and set it to a positive value (7200 is suggested in the comment): database_engine_option_pool_recycle = X --nate
David Hoover Helix Systems Staff http://helix.nih.gov _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev