Knowledge Base/Why do Polygon WebSocket disconnects happen?

Why do Polygon WebSocket disconnects happen?

WebSocket disconnects can happen for various reasons. One common reason is when market data is not being consumed fast enough

One common reason is when market data is not being consumed fast enough. Our server-side buffer can fill, resulting in delayed and killed connections.

To prevent this, it is best to read packets off the network immediately and put them into a queue. A separate thread can then parse the messages and process them.

Additionally, using multi-threaded languages like GoLang or C# can be more efficient for streaming large amounts of data than single-threaded languages like Python.

You can check the buffer limit in the connections tab in your dashboard. If you need additional assistance, please reach out to support@polygon.io.


Was this article helpful?

https://cdn.sanity.io/images/dhlwe0i3/production/282ed6a0b66079b791c1fb54aef0d268fb193ad7-592x416.png

Schedule a demo

Talk with our market data experts

Calendly
https://cdn.sanity.io/images/dhlwe0i3/production/70ffe6ec85723f74679004a0a6bbdf66ce1fb58f-592x256.png

Modernizing Wall St.

Reimagining financial market data for the 21st century.

About Polygon

Recommended

Can’t find the answer you’re looking for? Contact our team.