mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #1873] [bug]: Connecting to a very high traffic websocket server stalls #596
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#596
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Gunni on GitHub (Oct 13, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1873
Originally assigned to: @KaviiSuri on GitHub.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
wss://ris-live.ripe.net/v1/ws/?client=hoppscotch.io{ "type": "ris_subscribe" }to the remote serverExpected behavior
ris-live is a stream of bgp announcements on the internet, with the
{ "type": "ris_subscribe" }we don't filter it at all, there are over a thousand messages per second.Screenshots

Stalls at this point
Desktop (please complete the following information):
Additional context
Parameters on wss urls is considered invalid, but f.ex ris-live requires it.
@AndrewBastin commented on GitHub (Oct 14, 2021):
Thank you for opening the issue.
We will try to resolve it as soon as possible.
Meanwhile, if anyone wants to pick this up feel free to!
@KaviiSuri commented on GitHub (Mar 6, 2022):
Hey, I'd love to contribute to this issue. Is it still available?
@AndrewBastin commented on GitHub (Mar 7, 2022):
@KaviiSuri You can take this on if you want!
Assigning to you!
@KaviiSuri commented on GitHub (Mar 8, 2022):
Thanks @AndrewBastin!
I'll need some guidance as I'm new to opensouce.
I was thinking of solving this by rate limiting the number of messages received (we could make the limits configurable from UI)
Sort of how this library implements it (appears to be for the backend though)
https://github.com/jamen/ws-rate-limit/blob/master/index.js
The gist of it is:
messageCountto 0 everydurationseconds@Gunni commented on GitHub (Mar 8, 2022):
Maybe as a first step, but why not just handle the load gracefully?
The rislive website can do it, with no filtering at all (host = null), i get a ~20 mbit/s flow of messages, and it works fine.
Wireshark can capture all packets my computer is sending/receiving and is only limited by available memory on my computer.
@KaviiSuri commented on GitHub (Mar 9, 2022):
I'll look into their website on how they do it.
Do you have any ideas on what the bottleneck might be for us?
It might be the rerenders due to state update, will experiment a bit
@AndrewBastin commented on GitHub (Mar 9, 2022):
@KaviiSuri feel free to ask for help, you can also DM me directly on Discord if you want any help or have questions about the codebase and how stuff work (you can find me in the Hoppscotch Discord Server).
@Gunni As for the approach, I actually gave a crack at this issue long back (the branch is really stale now), the main bottleneck with the rapid firing sources on Hoppscotch turns out isn't the memory issues, but more related to how Vue functions and how much time Vue spends on diffing the Log component. The RIS Live site you mentioned also doesn't render all the entries below (as mentioned by its disclaimer) and instead just renders a static number of them.
A solution could be to virtualize the log component list so the only viewable logs get rendered (fixes diffing time to a constant value) along with small practices like buffering and stuff. We can still track render times (ticks) and see if we are lagging behind and then drop messages if so.
Internally though, we already have plans to rework the Realtime pages a bit and add some more features and some optimizations. You can still work on this if you want in case we couldn't fix it on our internal cycle.
@ashiishme commented on GitHub (May 18, 2022):
Hello @AndrewBastin, I would like to take over this issue if it is not in progress now.
@AndrewBastin commented on GitHub (May 19, 2022):
Hi @ashiishme, @KaviiSuri reached out to me a while back saying he is working on this.
@KaviiSuri please confirm you are working on it
@KaviiSuri commented on GitHub (May 19, 2022):
Yeah I'm working on this, will send a PR soon
@ganudoomer commented on GitHub (Jun 23, 2023):
Is this still up for grabs ? @KaviiSuri @AndrewBastin
@AndrewBastin commented on GitHub (Jun 26, 2023):
@ganudoomer yes you can pick this up if you want.
@varunagarwal007 commented on GitHub (Sep 25, 2023):
Hey @AndrewBastin, would like to work on it
@varunagarwal007 commented on GitHub (Sep 25, 2023):
@Gunni, have found the issue, let me know if it is still open to work
@Gunni commented on GitHub (Sep 25, 2023):
afaik nobody has solved this, but it's been a long time.
@kpguru20001 commented on GitHub (Oct 19, 2023):
Hi,
I ran the steps to reproduce but I am unable to reproduce the issue. I ended up fixing the Regex code to allow this particular type of URL
Here is a loom video: Loom Link
I was planning to update the regex to allow that particular syntax of wss urls
Please Guide me on how I can replicate this issue?
@Gunni commented on GitHub (Oct 20, 2023):
Thanks for fixing the parsing!
I am unable to reproduce the freezing issue too! Good?
@kpguru20001 commented on GitHub (Oct 20, 2023):
Great, Then I ll create a PR for the parsing?
@shreyash010 commented on GitHub (Jan 4, 2024):
is this issue resolved?
I am getting all the logs from the socket connection.
I am new to open source and have also been working on MEVN stack if you can suggest me how to get started it will be of great help to me.
@Gunni commented on GitHub (Feb 14, 2025):
This issue has been solved, just tested it now and it seems to work fine.