Comments (12)
ah cool ok I'll test it on monday, thanks again!
from bolt_sips.
Yes indeed updating does seem to respect the timeout when the query is run as presented, with one caveat!
This still seems to be dying with the longer than 15000ms
error message when passed as such:
def execute(query) do
Bolt.Sips.transaction(conn(), fn con ->
Bolt.Sips.query!(con, query)
end)
end
or
def execute(query) do
Bolt.Sips.transaction(conn(), fn con ->
Bolt.Sips.query!(con, query, %{}, timeout: 30_000)
end)
end
but this does respect the timeout whether set from the config, or passed in the params
def execute(query) do
# :timeout set in config
Bolt.Sips.query!(conn(), query, %{})
end
or
def execute(query) do
Bolt.Sips.query!(conn(), query, %{}, timeout: 30_000)
end
from bolt_sips.
Oh that's interesting, thank you for such a thorough investigation and for the examples. I'm going to look into the transaction next, in case it is related, and will report back my findings. Many thanks again!
from bolt_sips.
@ThunderHeavyIndustries - can you please use the latest published release and let us know if the problem is fixed?! Thank you
from bolt_sips.
Sure thing, I'll give it a go next week and get back to you.
from bolt_sips.
Thanks for getting back to me on this! I'm still experiencing the same issue/seeing the same 1500 ms
response after updating to 2.0.10
.
Maybe there's something on my end? Setup is as above. The function calls look like this:
given a query
which is a string (again verified to work in the Neo4j Desktop client)
def conn() do
Bolt.Sips.conn()
end
def execute(query) do
Bolt.Sips.transaction(conn(), fn con ->
Bolt.Sips.query!(con, query)
end)
end
I also tried passing the timeout as part of the params
def execute(query) do
Bolt.Sips.transaction(conn(), fn con ->
Bolt.Sips.query!(con, query, %{}, timeout: 60_000)
end)
end
Which doesn't change the behavior or the error message either. Thanks again for your help on this!
from bolt_sips.
yeah I am sorry, it was my fault. It should work now with 2.0.11.
Here's one easy way to test, provided you have the APOC enabled:
{:ok, _neo} = Sips.start_link(url: "bolt://neo4j:test@localhost")
conn = Sips.conn()
Sips.query(conn, "CALL apoc.util.sleep(30000) RETURN 1 as test", %{}, timeout: 35_000)
HTH
from bolt_sips.
SO SORRY! Crazy week I'll be checking it out later today!
from bolt_sips.
No worries, please take your time :)) many thanks
from bolt_sips.
I see what is going on. When you wrap your queries in transactions, Bolt.Sips delegates the call to the underlining library: DBConnection, including your custom ... options ;)
Please try this instead:
def execute(query) do
Bolt.Sips.transaction(conn(), fn con ->
Bolt.Sips.query!(con, query)
end, timeout: 30_000)
end
from bolt_sips.
I'll give that a go tomorrow!
from bolt_sips.
please reopen, in case you find any other related issue. Thanks again!
from bolt_sips.
Related Issues (20)
- Just need some clarity about Bolt.Sips.conn
- Connection difficulty -- Bolt.Sips.Internals.Error Port #Port<0.n> is closed HOT 7
- Connection loses after a while: ** (Bolt.Sips.Exception) Port {:sslsocket, {:gen_tcp, #Port<0.25>, :tls_connection, :undefined}, [#PID<0.2789.0>, #PID<0.2786.0>]} is closed HOT 5
- Is routing mode enabled with neo4j+s protocol? HOT 6
- Prepared statements for queries when not possible to use parameters HOT 3
- Looking for new maintainers HOT 9
- Neo4j version 4 support HOT 5
- Going forward HOT 5
- DBConnection.Holder.checkout(#PID<0.X.X>, [timeout: 15000 ]) HOT 2
- Road to neo4j 4 and streaming HOT 5
- Bolt.Sips.Protocol disconnected: ** (DBConnection.ConnectionError) HOT 13
- Unable to connect when using authentication HOT 14
- No write operations are allowed directly on this database. Writes must pass through the leader. The role of this server is: FOLLOWER HOT 3
- Hiding credentials in `Bolt.Sips.info`? HOT 3
- Request: guidance on parameterized queries HOT 4
- Response.profile is empty with a query with "PROFILE"
- (Bolt.Sips.Exception) unable to encode value: -128 HOT 1
- Outgoing SSL connection hangs, cannot be dropped and re-established HOT 2
- Feature request: auto reconnect HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bolt_sips.