Sylvain Hazard
11/28/2022, 8:43 AMprefect orion start --port 5000
as well as the very simple flow copied below. Running the flow with python log_flow.py
randomly ends up crashing with this error : RuntimeError: The connection pool was closed while 2 HTTP requests/responses were still in-flight
. Is this an issue related to the server ? Am I forgetting to await something ? Anything I could do to fix it ?import prefect
from prefect import flow, task, get_run_logger
from utilities import AN_IMPORTED_MESSAGE
@task
def log_task(name):
logger = get_run_logger()
<http://logger.info|logger.info>("Hello %s!", name)
<http://logger.info|logger.info>("Prefect Version = %s 🚀", prefect.__version__)
logger.debug(AN_IMPORTED_MESSAGE)
@task(description="get_names")
def get_names():
return range(50)
@flow()
def log_flow():
names = get_names()
for name in names:
log_task.submit(name)
if __name__ == "__main__":
log_flow()
Peyton Runyan
11/28/2022, 12:51 PMSylvain Hazard
11/28/2022, 1:07 PMPeyton Runyan
11/28/2022, 1:10 PMSylvain Hazard
11/28/2022, 1:10 PMPeyton Runyan
11/28/2022, 1:11 PMSylvain Hazard
11/28/2022, 1:11 PMPeyton Runyan
11/28/2022, 2:31 PMSylvain Hazard
11/28/2022, 2:46 PMPeyton Runyan
11/28/2022, 3:03 PMSylvain Hazard
11/28/2022, 3:04 PMPeyton Runyan
11/28/2022, 3:05 PMSylvain Hazard
11/28/2022, 3:06 PMMathijs Carlu
11/28/2022, 3:15 PMPeyton Runyan
11/28/2022, 3:16 PMhttpcore 0.16.1
to 0.16.2
and see if that addresses it? Apparently there's an issue with it that has been causing people trouble elsewhere.Sylvain Hazard
11/28/2022, 5:18 PMPeyton Runyan
11/29/2022, 12:03 PMSylvain Hazard
11/29/2022, 12:25 PMPeyton Runyan
11/29/2022, 12:36 PMconnection pool closed with xyz in-flight
is always caused by some sort of upstream error, and this case the error is httpcore. Thanks a ton for working with us on this thought man!Sylvain Hazard
11/29/2022, 12:36 PMZanie
11/30/2022, 4:01 PMsee if we just want to avoid 0.16.1 specifically vs forcing 0.16.2 and aboveYeah I believe that is better practice.