Skip to content

Allow Timeout Configuration for web_server_proxy #2752

Closed
@Dragoy

Description

@Dragoy

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.

timeout=aiohttp.ClientTimeout(total=3600),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions