When search_video takes longer than 30 seconds the search results aren't returned to the browser. Instead, the connection is marked as stalled. The request processing is being retried inside uvicorn/ fastapi, however once the slow method returns, the results aren't forwarded to the browser.
Only if the method returns within 30 seconds the results are eventually forwarded to the browser.
This can be reproduced easily by ie adding a sleep statement to search_video; alternatively the app needs to be restarted a couple of times (~4 times) to end up with a slow search processing.
details from ONC-213:
When
search_video
takes longer than 30 seconds the search results aren't returned to the browser. Instead, the connection is marked as stalled. The request processing is being retried inside uvicorn/ fastapi, however once the slow method returns, the results aren't forwarded to the browser. Only if the method returns within 30 seconds the results are eventually forwarded to the browser.This can be reproduced easily by ie adding a sleep statement to
search_video
; alternatively the app needs to be restarted a couple of times (~4 times) to end up with a slow search processing.