airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Huang (JIRA)" <>
Subject [jira] [Created] (AIRFLOW-1559) MySQL warnings about aborted connections, missing engine disposal
Date Fri, 01 Sep 2017 22:48:02 GMT
Daniel Huang created AIRFLOW-1559:

             Summary: MySQL warnings about aborted connections, missing engine disposal
                 Key: AIRFLOW-1559
             Project: Apache Airflow
          Issue Type: Bug
          Components: db
            Reporter: Daniel Huang
            Priority: Minor

We're seeing a flood of warnings about aborted connections in our MySQL logs. 

Aborted connection 56720 to db: 'airflow' user: 'foo' host: 'x.x.x.x' (Got an error reading
communication packets)

It appears this is because we're not performing [engine disposal|].
The most common source of this warning is from the scheduler, when it kicks off new processes
to process the DAG files. Calling dispose in
greatly reduced these messages. However, the worker is still causing some of these, I assume
from when we spin up processes to run tasks. We do call dispose in,
but I think it's a bit early. Not sure if there's a place we can put this cleanup to ensure
it's done everywhere.

Quick script to reproduce this warning message:

from airflow import settings
from airflow.models import Connection

session = settings.Session()
# not calling settings.engine.dispose()

Reproduced with Airflow 1.8.1, MySQL 5.7, and SQLAlchemy 1.1.13. 

This message was sent by Atlassian JIRA

View raw message