-
Notifications
You must be signed in to change notification settings - Fork 336
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
No activity within 45000 milliseconds. Reconnecting. #143
Comments
@BishoyBishai can you please explain more about this issue? Is it the same behavior that you are experiencing? |
I observe the same behaviour. The heartbeat is sent every 15 seconds, but after about 5 minutes I get the |
@BishoyBishai , @akaskj , @tiimoS - I also have this problem. Can we possibly pool knowledge to see if there are any similarities? However, if I manually create SSE messages to the client with actual data all connections stay open. So, it may may be that the small heartbeat messages are being ignored or something else is happening. My message contains a single word 'Heartbeat' in the message. I may try enlarging that or changing some things around. What kind of heartbeat do you send? |
Maybe it could help if you sent specific type of events and listened to them through addEventLister("type", callback) instead of listening for the generic "message" type. This worked for me at least. I am using Mercure to send messages to the clients. |
Here's how I resolved this issue on Spring Boot: Keep on sending a 'loading message' from your backend server under 45 seconds so that the event channel remains open until real data is fetched.
I am sending a loading message after every 15 seconds. Have a look at this link for reference: |
Hi!I ran into the same problem. Here's how I resolved this issue in the following article |
@udhayaas97 i switched to use https://www.npmjs.com/package/eventsource instead |
@cwirz , Thank you for your reply. There I have raised three issues.
Is there any working example for Angular? |
@udhayaas97 Did you find out any solution to your porblem? I am running into same error. |
@sanketkarandikar , I didn't find any solution for this issue. I have been using a diffrent way without using this package. |
@polixisNG Did that solve the |
@jbouhier unfortunately it doesn't solve the issue, I just tested it |
@serkyron what is the issue? Do you see it always? or sometimes? |
@serkyron Did you try with 2 minutes timeout ? |
@jbouhier Yes, I tried 2 minutes timeout. Same result |
@Yaffle My situation is a bit different. I'm not sending heartbeat, but in my case it's not expected. I use Mercure Hub to deliver updates from Symfony backend. So I'm subscribing to a SSE endpoint, and obviously there is no guarantee there will be an update to push every 45 or N seconds. I can of course set up a cron process sending heartbeat but that sounds like a work around, which I wouldn't like to do. Is there an option to prevent event listener from expecting heartbeat? |
@serkyron you could pass heartbeatTimeout option with a big value |
@serkyron Mercure automatically sends heartbeat messages, so there is no need to set up a dedicated CRON job. |
Whether to consider a compromise: The server sends an invalid message every less than 45000ms to maintain the connection. |
Anyone have an actual solution to this? |
Possible solution to this problem here: #193 (comment) |
No description provided.
The text was updated successfully, but these errors were encountered: