Environment
Ran Memgraph locally on Ubuntu 20.04, used python neo4j drivers 4.4.0 and 5.8.0
Describe the bug
The user can define a timeout when sending a single query or starting a new transaction.
This information gets ignored and the query/transaction runs till completed.
To Reproduce
Steps to reproduce the behavior with single queries:
Memgraph version 2.7.0
Environment Ran Memgraph locally on Ubuntu 20.04, used python neo4j drivers 4.4.0 and 5.8.0
Describe the bug The user can define a timeout when sending a single query or starting a new transaction. This information gets ignored and the query/transaction runs till completed.
To Reproduce Steps to reproduce the behavior with single queries:
MEMGRAPH_URL = "bolt://localhost:7687" TIMEOUT_SEC = 0.1
driver = neo4j.GraphDatabase.driver(MEMGRAPH_URL, auth=None)
def single_query(s): try: query = neo4j.Query("...query...", timeout=TIMEOUT_SEC) result = s.run(query) result.values() except: print("Timed out!") return
with driver.session() as session: single_query(session)
import neo4j
MEMGRAPH_URL = "bolt://localhost:7687" TIMEOUT_SEC = 0.1
driver = neo4j.GraphDatabase.driver(MEMGRAPH_URL, auth=None)
def single_query(tx): result = tx.run("...query...") result.values() return
with driver.session() as session: tx = session.begin_transaction(timeout=TIMEOUT_SEC) try: single_query(tx) tx.commit() except: print("Timed out!")