Description
The web_server_proxy function in Modal, designed to proxy requests to a local web server, currently uses a hardcoded timeout of 3600 seconds (1 hour) within its internal aiohttp.ClientSession. This fixed timeout presents challenges when proxying requests to services that might require longer processing times, such as those involving machine learning model training or extensive data operations.
This lack of configurability can lead to premature termination of requests that exceed the one-hour limit, disrupting long-running tasks and negatively impacting user experience.
Proposed Solution:
Introduce a mechanism to allow customization of the aiohttp.ClientTimeout
used within web_server_proxy
.
Introduce a global or app-level configuration option: This would allow setting a default timeout for all web_server_proxy
instances within an application.
Line 323 in b61aed4