You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I confronted an issue after deploying my fastapi stream app!
I use RESPONSE_STREAM mode to stream my response. It works well in normal situation. However, when I want to raise HTTP Exception error, the server does not respond and fall in the infinite loop with this endless text of log.
Server Log
...
| 2025-02-13T06:03:47.379Z | INFO: 127.0.0.1:35402 - "GET / HTTP/1.1" 500 Internal Server Error
| 2025-02-13T06:03:47.391Z | INFO: 127.0.0.1:35402 - "GET / HTTP/1.1" 500 Internal Server Error
| 2025-02-13T06:03:47.404Z | INFO: 127.0.0.1:35402 - "GET / HTTP/1.1" 500 Internal Server Error
| 2025-02-13T06:03:47.416Z | INFO: 127.0.0.1:35402 - "GET / HTTP/1.1" 500 Internal Server Error
| 2025-02-13T06:03:47.428Z | INFO: 127.0.0.1:35402 - "GET / HTTP/1.1" 500 Internal Server Error
| 2025-02-13T06:03:47.440Z | INFO lambda_web_adapter: app is not ready after 8000ms url=http://127.0.0.1:8000/
| 2025-02-13T06:03:47.441Z | INFO: 127.0.0.1:35402 - "GET / HTTP/1.1" 500 Internal Server Error
| 2025-02-13T06:03:47.453Z | INFO: 127.0.0.1:35402 - "GET / HTTP/1.1" 500 Internal Server Error
| 2025-02-13T06:03:47.466Z | INFO: 127.0.0.1:35402 - "GET / HTTP/1.1" 500 Internal Server Error
...
Code snippet of main.py
@app.get("/")
def read_root():
raise HTTPException(
status_code=500, detail="Error occured"
)
return {"message": "Welcome to the chatbot API!"}
I confronted an issue after deploying my fastapi stream app!
I use RESPONSE_STREAM mode to stream my response. It works well in normal situation. However, when I want to raise HTTP Exception error, the server does not respond and fall in the infinite loop with this endless text of log.
Server Log
Code snippet of main.py
template.yaml
Does any one know how to fix this? 🥺
The text was updated successfully, but these errors were encountered: