Replies: 2 comments 5 replies
-
Hi @kotolex, which Python SDK are you using and what version? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I use this https://github.com/kotolex/surrealist, but its not the point, I tried to use just "naked" websocket-client in python and results are the same - it is feels like some queue under the hood or some other cache or limit for one user. When I asked this question in Discord -one more person said he considered the same behavior in javascript and have to use only one connection instead of the pool. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First here is docs "This allows you to maintain a single connection to run all your queries, but also opens up the possibility of Live Queries!" Pay attention to "single connection" here.
Now is my problem(from discord):
I am trying to create my own connections pool (python) and get strange load results of SurrealDb.
Twenty threads use 20 websocket connections (1 for each) with surrealdb, but all of them are auth with the same user (root), all of them requests same amount of data (1000 big records each). And what I see is constantly growing time for them to wait for responses.
Thread-9 1.6291930675506592
Thread-1 1.9866671562194824
Thread-12 2.337606191635132
Thread-4 2.696981906890869
Thread-2 3.2070257663726807
Thread-17 3.3783910274505615
Thread-10 3.757390022277832
Thread-3 4.36739706993103
Thread-15 4.446112155914307
Thread-13 4.417494058609009
Thread-5 5.1424901485443115
Thread-6 5.528377056121826
Thread-14 5.586357831954956
Thread-8 6.146180152893066
Thread-7 6.448051929473877
Thread-19 6.766908168792725
Thread-18 7.121902942657471
Thread-20 7.4107677936553955
Thread-16 7.7359559535980225
Thread-11 8.073976993560791
Total Time: 8.458957195281982
So thread number 9 waits 1 second and thread 11 wait for 8 seconds for the same data.
I expect all threads works the same (+-) speed and I try to do all that I can to make sure problem is not on my side.
Dont you have some kind of cache or pipe for 1 user? Some queue under the hood? Or any ideas about such behavior? Do you have load test for that situation? Be very glad for any help!
Can SurrealDB support multiple connections and queries in parallel for one user?
In Discord as I can see other users meet the same problem
@rushmorem @kearfy @phughk
Beta Was this translation helpful? Give feedback.
All reactions