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 can't connect after run a few hours #9

Open
tymon3568 opened this issue May 11, 2024 · 0 comments
Open

websocket can't connect after run a few hours #9

tymon3568 opened this issue May 11, 2024 · 0 comments

Comments

@tymon3568
Copy link

i install Surrealdb with caprover, database work well. But after 4-5h, i can't connect to surrealdb wss. So my webapp get 500 errors, because websocket can't connect. I use webapp with cloudflare cache ( but when i set cloudflare in developement mode ( no cache), surrealdb still errors after some hours). When i restart surreal app in Caprover, it work again, and still connected. But after some hours, i can't connect using surrealist or webapp can't connect.
When i don't use observeLive ( data.live() ) The surrealdb work well. So what happen? Does we use observeLive right? Or does we have to using in onMount like this:

onMount(async() => {
   await observeLive("watching_list", watchingList)
})

And have to close connect on

onDestroy(() => {
close data connection???....
})

How to fix this errors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant