-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frequent "MySQL server has gone away" errors #1095
Comments
+1 |
First option to look at is change some parameters related to timeout in /etc/my.cnf . See http://piwik.org/faq/troubleshooting/faq_183/ . And https://www.drupal.org/node/259580 . For airflow we might need to look at how we do sessions (didn't really check) @mistercrunch http://stackoverflow.com/questions/6471549/avoiding-mysql-server-has-gone-away-on-infrequently-used-python-flask-server#6473271 |
@griffinqiu @krisskross did you have a look at the sql_alchemy_pool_recycle option? It defaults to 3600 and that might be too long in your case. |
You can also shut off connection pooling altogether by setting the size of the pool to |
Looking at http://dev.mysql.com/doc/refman/5.7/en/gone-away.html, there are many reasons this may be happening. Some of the reasons are possibly concerning :
I don't run MySQL. It would go good to isolate what is going on here for those running on MySQL. @krisskross any further details? |
We're not doing anything with the database, it's all airflow. We have other Java applications that pool connections to the same MySQL installation without problems, so this doesn't feel like a configuration issue with MySQL. I'm not sure exactly how to set the pool size to 0? Is it the |
Not sure if helpful, but we run the webserver, scheduler and worker on the same machine. |
Oops actually it's dependent on this PR I'll see if I can rebase and merge it now |
Sorry for the delay. Is there anything I can do to help? |
Any update on this one? @krisskross in addition please verify that your mysql server is not being killed due to being out of memory. "Gone away" = loosing connection. table_cache, max_connections and memory all affect these. A clean install with default settings tuned to mysql and localexecutor can easily consume up to 8GB with a reasonable amount of dags getting loaded. Please create a Jira issue if this persists and provide logging from syslog and mysql. |
* Prepare 0.13.0 release Signed-off-by: wslulciuc <willy@datakin.com> * continued: Prepare 0.13.0 release Signed-off-by: wslulciuc <willy@datakin.com>
* Prepare 0.13.0 release Signed-off-by: wslulciuc <willy@datakin.com> * continued: Prepare 0.13.0 release Signed-off-by: wslulciuc <willy@datakin.com>
The webserver frequently reports "MySQL server has gone away" errors. Usually this happens after the UI haven't been used for a few minutes. The mysql documentation indicate that it may be a timed out connection.
The text was updated successfully, but these errors were encountered: