Skip to content

Commit

Permalink
Increase modal timeout to 35m
Browse files Browse the repository at this point in the history
  • Loading branch information
beastoin committed Oct 10, 2024
1 parent 3d51901 commit 80befad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
memory=(512, 1024),
cpu=2,
allow_concurrent_inputs=10,
timeout=60 * 10,
timeout=60 * 35,
)
@asgi_app()
def api():
Expand Down
2 changes: 1 addition & 1 deletion backend/routers/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async def _websocket_util(
loop = asyncio.get_event_loop()

# Soft timeout, should < MODAL_TIME_OUT - 3m
timeout_seconds = 420 # 7m
timeout_seconds = 1920 # 32m
started_at = time.time()

def stream_transcript(segments, stream_id):
Expand Down
2 changes: 1 addition & 1 deletion backend/routers/transcribe_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ async def receive_audio(dg_socket1, dg_socket2, soniox_socket, speechmatics_sock

# heart beat
started_at = time.time()
timeout_seconds = 420 # 7m # Soft timeout, should < MODAL_TIME_OUT - 3m
timeout_seconds = 1920 # 32m # Soft timeout, should < MODAL_TIME_OUT - 3m
has_timeout = os.getenv('NO_SOCKET_TIMEOUT') is None

async def send_heartbeat():
Expand Down

0 comments on commit 80befad

Please sign in to comment.