I am using SSE in VueJs and whenever I deploy my API I face issue of max request time out with Event-Stream and this issue occurred multiple time after deployment
Here are the environment and error details
Api: Azure AppService
Web: VueJs Single Page app and deployed on Azure AppService
Api and Web are deployed on different AppServices.
Error:
230 seconds is the maximum amount of time that a request can take without sending any data back to the response. It is not configurable. For more details, refer to Time Out After 230 seconds. If your web app requires background processing, we recommend using Azure WebJobs. The Azure web app can call WebJobs and be notified when background processing is finished. You can choose from multiple methods for using WebJobs, including queues and triggers
Error Url:
/api/event-stream
Can anyone please help me to understand why this is happening and how I can fix this issue.
It sounds like your Host does not like the long lived SSE HTTP Connection stream which isn’t going to be compatible with your host unless the timeout can be disabled.
If it’s a persistent connection timeout error then the HTTP Error would be enforced by the external Web Server or Gateway hosting the App. What’s the full HTTP Response Header of the Error Response? It should contain who issued the error response.
That’s a standard HTTP Error code that gateways return, it doesn’t identify the underlying issue which they could decide to return for any reason e.g. like not supporting persistent HTTP connections as apparently Azure Application Gateway does not support server-sent events: