coolacid edited a comment on issue #16271:
URL: https://github.com/apache/airflow/issues/16271#issuecomment-854864127


   If I remove the `register_pre_exec_callback(default_action_log)` from 
`utils.cli_action_loggers` I no longer have the dangling open connection. 
   
   ```
   af_worker    | [2021-06-04 16:27:44,517: DEBUG/MainProcess] Disposing DB 
connection pool (PID 6)
   af_worker    | [2021-06-04 16:27:44,518: WARNING/MainProcess] Pool size: 5  
Connections in pool: 0 Current Overflow: -5 Current Checked out connections: 0
   ```
   However, I still get `Got an error reading communication packets`.
   
   ```
   mysql_1      | 2021-06-04T16:35:55.204039Z 3213 [Note] Got an error reading 
communication packets
   mysql_1      | 2021-06-04T16:35:55.264724Z 3214 [Note] Got an error reading 
communication packets
   ```
   Enabling the query log again, and checking for those connection IDs show no 
actual queries. 
   
   After turning off the webserver, and scheduler (to reduce mysql query logs), 
I can confirm the worker is making connections, but not actually a full 
connection: 
   
   ```
   mysql_1      | 2021-06-04T16:48:26.400006Z 3251 [Note] Got an error reading 
communication packets
   mysql_1      | 2021-06-04T16:48:26.458383Z 3252 [Note] Got an error reading 
communication packets
   ```
   Here I set the general_log on, and restart the worker. Then turn off the 
general_log. 
   ```
   mysqld, Version: 5.7.34 (MySQL Community Server (GPL)). started with:
   Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
   Time                 Id Command    Argument
   2021-06-04T16:48:19.979034Z      3250 Quit
   2021-06-04T16:48:27.734718Z      3253 Connect   root@localhost on  using 
Socket
   2021-06-04T16:48:27.734815Z      3253 Query     select @@version_comment 
limit 1
   2021-06-04T16:48:31.000005Z      3253 Query     SET GLOBAL general_log = 
'OFF'
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to