In one of our environments we execute quite heavy query from python script using psycopg2. It takes more then 10 min to execute but we get a result and can consume received data.
When we move the same script to different environment then after ~5min we get an error: psycopg2.InterfaceError: connection already closed
What may be the reason for that?