It seems that TCP keep-alive logic in production environments may not be sufficient. Most likely, there will be a WAF and load balancers between the client and the server. TCP keep-alive will only cover the client-WAF connection, but load balancers may still impose restrictions. A better approach would be to initiate the command in the background without waiting for a response, then separately check the status and retrieve the results, ideally in the same Airflow task.
... View more