Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket connection stops working after few days #2953

Closed
gyan opened this issue Nov 2, 2021 · 8 comments
Closed

Websocket connection stops working after few days #2953

gyan opened this issue Nov 2, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@gyan
Copy link

gyan commented Nov 2, 2021

Bug

I am running graph-node in a dockerized environment inside aws ec2. Both https and wss endpoints work fine, but after few days the websocket endpoint suddenly stops responding and request finishes after almost 5-10 seconds.

When I restart the container, everything works normally as expected and the issue repeats itself again after sometimes.

@azf20
Copy link
Contributor

azf20 commented Nov 2, 2021

Hi @gyan - thanks for reporting. Graph Node's current subscriptions implementation is known not to be resilient, which may be what you are seeing here. We have a refactor planned, but have not got to it yet. What are you using the websocket connection for?

@gyan
Copy link
Author

gyan commented Nov 3, 2021

Thanks for the update @azf20
Well I am using it to listen to new data as a part of the subscription service offered by graphql servers.
If there is no tentative timeline for the same, could you offer an alternative solution to the same? Interval based Polling seems to be the way to go.

Our graph server is supposed to index high frequency data and deliver the same to the subscribed client. So, subscriptions seemed a great way to cater to this problem.

@azf20
Copy link
Contributor

azf20 commented Nov 6, 2021

OK - yes interval based polling is the most reliable & recommended approach at this point, though we will hope to enable better support your high frequency requirement with subscriptions in future

@gyan
Copy link
Author

gyan commented Nov 27, 2021

Hi @azf20
Earlier I was able to fix the web socket port unreachability by simply restarting the container. Although, now it doesn't seem to fix and the port is still unreachable. Do I have to redeploy the server?

@nakamuraos
Copy link

nakamuraos commented Dec 7, 2021

Hi @azf20,
I have same the issue. Any new update for it?
I'm using v0.25.0.

@azf20 azf20 added the bug Something isn't working label Dec 9, 2021
@azf20
Copy link
Contributor

azf20 commented Dec 9, 2021

hey @nakamuraos and @gyan - no additional update for now. As mentioned websockets are not currently recommended due to instability

@KholdStare
Copy link

@azf20 Hi! Wondering if there are any updates regarding websocket support, including on the hosted service. It would make our frontend a lot simpler/responsive if we could just subscribe to updates.

@lutter
Copy link
Collaborator

lutter commented Apr 6, 2025

Subscriptions are no longer supported

@lutter lutter closed this as completed Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants