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
Bug: Deadlock encountered #3987
Comments
Heya @triracle97 thanks for raising this. The live queries are going through a significant design change that will reduce the chance of this deadlock happening significantly. We are currently seeing another perf issue with 1.4.x in #3906 - it may be loosely related or at least correlated. Will have a look once 3906 is resolved. |
Thanks for replying @phughk! |
Unfortunately, that isn't possible - the lock is required to check which connection to send live query notifications to. |
Update for this, since updated to 1.5.0, I haven't encountered this and can't reproduce it with above method |
I encountered it again, the issue still persists, just harder to reproduce |
Thanks for the update and info - we will try to tackle this in. The solution would be to have channels with messages and a single handler. It's a bit of work and we are very focused on cloud and 2.0 at the moment. But this is on our radar. Hopefully retrying can be a way around this |
Describe the bug
When I ran surrealdb intensively with live query, the database hang at this point in file
src/net/rpc.rs
I used js sdk + reactjs and I tried both surreal docker and self built surreal in an ubuntu server. When I refreshed the page, the connection wasn't cleared.
Steps to reproduce
I can consistently reproduce the error with this scenario
start surreal db with this command
Then create a simple react project with
npx create-react-app my-app
Copy the following snippet to App.js
Open 4 tabs with
http://localhost:3000
, refresh the all tabs several times and then wait around 5 mins, then try to refresh any tab multiple times again, the websocket will be in pending state (the server will hang at above code)Expected behaviour
I guess this is a deadlock, and it shouldn't happen
SurrealDB version
v1.4.2, built in x86_64-unknown-linux-gnu
Contact Details
No response
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: