# ReactJS Apollo Client Subscription stops working after 24 hours or when users change tabs

**URL:** <https://community.apollographql.com/t/reactjs-apollo-client-subscription-stops-working-after-24-hours-or-when-users-change-tabs/6532>\
**Category:** Client SDKs\
**Tags:** client\
**Created:** [July 27, 2023, 6:34pm UTC](https://community.apollographql.com/t/reactjs-apollo-client-subscription-stops-working-after-24-hours-or-when-users-change-tabs/6532 "2023-07-27T18:34:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moi](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/moi/32/4419_2.png) [@Moi](https://community.apollographql.com/u/Moi)\
**Post date:** [July 27, 2023, 6:34pm UTC](https://community.apollographql.com/t/reactjs-apollo-client-subscription-stops-working-after-24-hours-or-when-users-change-tabs/6532/1 "2023-07-27T18:34:07Z")

</div>

I am using createSubscriptionHandshakeLink and subscriptions simply stop working after 24 hours even though the user is till authenticated (token lasts a really long time)

---

<div class="post-metadata">

**Author:** ![jerelmiller](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/jerelmiller/32/3314_2.png) [@jerelmiller](https://community.apollographql.com/u/jerelmiller)\
**Post date:** [July 27, 2023, 8:20pm UTC](https://community.apollographql.com/t/reactjs-apollo-client-subscription-stops-working-after-24-hours-or-when-users-change-tabs/6532/2 "2023-07-27T20:20:34Z")

</div>

Hey @Moi 👋

Unfortunately Apollo doesn’t maintain that link, so the best bet would be to open an issue over in the [AWS AppSync repo](https://github.com/awslabs/aws-mobile-appsync-sdk-js) (I’m pretty sure this is where that link comes from). Apollo core just forwards the operations to the links themselves, but its up to the links to handle how to connect/terminate the connection for any given operation. You might find something useful in that repo that helps here.

---

<div class="post-metadata">

**Author:** ![jerelmiller](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/jerelmiller/32/3314_2.png) [@jerelmiller](https://community.apollographql.com/u/jerelmiller)\
**Post date:** [July 27, 2023, 8:23pm UTC](https://community.apollographql.com/t/reactjs-apollo-client-subscription-stops-working-after-24-hours-or-when-users-change-tabs/6532/3 "2023-07-27T20:23:19Z")

</div>

I should also mention, there _might_ be a possibility you can get this to automatically retry with either the built-in [`RetryLink`](https://www.apollographql.com/docs/react/api/link/apollo-link-retry) or [`onError` link](https://www.apollographql.com/docs/react/api/link/apollo-link-error), which both have retry capability. Take a look at those as well. Perhaps you’ll find a way to get this to work with `createSubscriptionHandshakeLink`.

---

<div class="post-metadata">

**Author:** ![Justin\_Gonzalez](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/justin_gonzalez/32/5359_2.png) [@Justin\_Gonzalez](https://community.apollographql.com/u/Justin_Gonzalez)\
**Post date:** [February 6, 2025, 8:48pm UTC](https://community.apollographql.com/t/reactjs-apollo-client-subscription-stops-working-after-24-hours-or-when-users-change-tabs/6532/4 "2025-02-06T20:48:35Z")

</div>


