[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# Websoket connection detail

251 views · 0 likes · 2 posts


Trishalamjain (@trishalamjain) · 2024-08-26

<!-- Be sure to include all detail needed to let others see the same problem -->hello i am facing a problm with websocket connections when i'm running my deployed app. on a local host it works just fine but on vercel the websocket is not connected


Sebastian (@webmonkey) · 2024-08-26

Hi @trishalamjain,

Due to the nature of Vercel's serveless infrastructure, WebSocket connections aren't supported.
While Vercel Functions technically support streaming responses, they have a maximum execution limit and will time out after a certain amount of time, so keeping a connection (via WS) alive isn't possible in this case.

Alternatively, you can also fetch realtime data on-demand, using packages like [SWR](https://swr.vercel.app/).

You can learn more in this troubleshooting Guide [here](https://vercel.com/guides/do-vercel-serverless-functions-support-websocket-connections).