# Long-lived WebSocket Connections

**URL:** <https://community.tradovate.com/t/long-lived-websocket-connections/3064>\
**Category:** Community Support\
**Created:** [September 16, 2021, 2:57am UTC](https://community.tradovate.com/t/long-lived-websocket-connections/3064 "2021-09-16T02:57:10Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Brady](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@Brady](https://community.tradovate.com/u/Brady)\
**Post date:** [December 29, 2021, 4:33am UTC](https://community.tradovate.com/t/long-lived-websocket-connections/3064/7 "2021-12-29T04:33:52Z")

</div>

Linking to a related topic with more advice:

> [@Token Expiration Behavior](https://community.tradovate.com/t/token-expiration-behavior/3586):
>
> Hi @Alexander , I have noticed sometimes even though I might renew the access token, I still get disconnected from an existing socket connection. What is the best practice for when to renew? should I reconnect anytime my token expires? Tue, 28 Dec 2021 10:54:50 -0800 - Any - Renewed Access token. Now expiring at 28-Dec-2021 12:14:47 Tue, 28 Dec 2021 11:09:07 -0800 - Trading - Received closing frame Some( CloseFrame { code: Normal, reason: "Bye", }, )

---

_[View the full topic](https://community.tradovate.com/t/long-lived-websocket-connections/3064)._
