Thank you for your detailed response. It was indeed misunderstanding from my side that it is happening because of recv_time_out
. Thanks for pointing that out. Infact, i am getting this value as 120 seconds and program is erroring out exactly after 5 minutes.
Having said that, I am still experiencing issues with connections closing after 5 minutes despite having the max_connection_lifetime
set to its default value. The connections work fine up to 4 minutes but fail after 5 minutes.
I have gone through following article and used program attached there to find out root cause.
How to handle Session Expired Errors while connecting to Neo4j Aura
Here is the code I am using for establishing connections and setting configurations:
with (driver = neo4j.driver(NEO4J_URI, neo4j.auth.basic(NEO4J_USER, NEO4J_PASS), {
maxConnectionPoolSize: 1,
// The logging block code
logging: {
// setting the logging level to debug, possible options 'debug', 'info', 'warn', 'error'
level: 'debug',
// the logger function. It will receive log level and the message to be logged.
logger: (level, message) => {
console[level].call(console, `${level.toUpperCase()} ${message}`)
}
}
})) {
with (session = driver.session({ database: 'neo4j', defaultAccessMode: neo4j.session.READ })) {
with (txc = session.beginTransaction()) {
txc.run("RETURN 1 AS n")
Below are the elaborated log entries for the connection working fine till 4 minutes (240 seconds):
2024-06-25 10:39:48.431956 This script will check if connections idle after the following lifetime values are still usable(seconds):
240, 300
2024-06-25 10:39:48.432580 Attempting to connect to neo4j://<neo4j_FQDN>:7687
2024-06-25 10:39:48.432804 Checking connection lifetime of 240 seconds
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,433 [#0000] _: <POOL> created, routing address IPv4Address(('<neo4j_FQDN>', 7687))
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,433 [#0000] _: <POOL> acquire routing connection, access_mode='READ', database='neo4j'
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,433 [#0000] _: <ROUTING> checking table freshness (readonly=True): table expired=True, has_server_for_mode=False, table routers={IPv4Address(('<neo4j_FQDN>', 7687))} => False
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,433 [#0000] _: <POOL> attempting to update routing table from IPv4Address(('<neo4j_FQDN>', 7687))
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,433 [#0000] _: <RESOLVE> in: <neo4j_FQDN>:7687
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,439 [#0000] _: <RESOLVE> dns resolver out: <IP_ADDR>:7687
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,439 [#0000] _: <POOL> _acquire router connection, database='neo4j', address=ResolvedIPv4Address(('<IP_ADDR>', 7687))
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,439 [#0000] _: <POOL> trying to hand out new connection
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,439 [#0000] C: <OPEN> <IP_ADDR>:7687
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,464 [#D244] C: <MAGIC> 0x6060B017
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,465 [#D244] C: <HANDSHAKE> 0x00040405 0x00020404 0x00000104 0x00000003
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,488 [#D244] S: <HANDSHAKE> 0x00000405
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,488 [#D244] C: HELLO {'user_agent': 'neo4j-python/5.19.0 Python/3.10.13-final-0 (linux)', 'routing': {'address': '<neo4j_FQDN>:7687'}, 'bolt_agent': {'product': 'neo4j-python/5.19.0', 'platform': 'Linux 6.5.0-1021-azure; x86_64', 'language': 'Python/3.10.13-final-0', 'language_details': 'CPython; 3.10.13-final-0 (main, Mar 21 2024 17:51:02) [GCC 9.4.0]'}}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,488 [#D244] _: <CONNECTION> client state: CONNECTED > AUTHENTICATION
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,488 [#D244] C: LOGON {'scheme': 'basic', 'principal': 'neo4j', 'credentials': '*******'}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,489 [#D244] _: <CONNECTION> client state: AUTHENTICATION > READY
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,513 [#D244] S: SUCCESS {'server': 'Neo4j/5.19.0', 'connection_id': 'bolt-854', 'hints': {'connection.recv_timeout_seconds': 120}}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,513 [#D244] _: <CONNECTION> server state: CONNECTED > AUTHENTICATION
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,513 [#D244] S: SUCCESS {}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,513 [#D244] _: <CONNECTION> server state: AUTHENTICATION > READY
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,514 [#D244] C: ROUTE {'address': '<neo4j_FQDN>:7687'} () {'db': 'neo4j'}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,537 [#D244] S: SUCCESS {'rt': {'servers': [{'addresses': ['<neo4j_FQDN>:7687'], 'role': 'WRITE'}, {'addresses': ['<neo4j_FQDN>:7687'], 'role': 'READ'}, {'addresses': ['<neo4j_FQDN>:7687'], 'role': 'ROUTE'}], 'ttl': 300, 'db': 'neo4j'}}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,538 [#D244] _: <POOL> released bolt-854
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,538 [#0000] _: <ROUTING> updated table=RoutingTable(database='neo4j' routers={IPv4Address(('<neo4j_FQDN>', 7687))}, readers={IPv4Address(('<neo4j_FQDN>', 7687))}, writers={IPv4Address(('<neo4j_FQDN>', 7687))}, last_updated_time=1982.864543171, ttl=300)
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,538 [#0000] _: <POOL> update routing table from address=ResolvedIPv4Address(('<IP_ADDR>', 7687)) (RoutingTable(database='neo4j' routers={IPv4Address(('<neo4j_FQDN>', 7687))}, readers={IPv4Address(('<neo4j_FQDN>', 7687))}, writers={IPv4Address(('<neo4j_FQDN>', 7687))}, last_updated_time=1982.864543171, ttl=300))
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,538 [#0000] _: <POOL> acquire address, database='neo4j' address=IPv4Address(('<neo4j_FQDN>', 7687))
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,538 [#0000] _: <POOL> trying to hand out new connection
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,538 [#0000] _: <RESOLVE> in: <neo4j_FQDN>:7687
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,540 [#0000] _: <RESOLVE> dns resolver out: <IP_ADDR>:7687
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,541 [#0000] C: <OPEN> <IP_ADDR>:7687
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,562 [#D252] C: <MAGIC> 0x6060B017
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,562 [#D252] C: <HANDSHAKE> 0x00040405 0x00020404 0x00000104 0x00000003
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,583 [#D252] S: <HANDSHAKE> 0x00000405
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,583 [#D252] C: HELLO {'user_agent': 'neo4j-python/5.19.0 Python/3.10.13-final-0 (linux)', 'routing': {'address': '<neo4j_FQDN>:7687'}, 'bolt_agent': {'product': 'neo4j-python/5.19.0', 'platform': 'Linux 6.5.0-1021-azure; x86_64', 'language': 'Python/3.10.13-final-0', 'language_details': 'CPython; 3.10.13-final-0 (main, Mar 21 2024 17:51:02) [GCC 9.4.0]'}}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,583 [#D252] _: <CONNECTION> client state: CONNECTED > AUTHENTICATION
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,584 [#D252] C: LOGON {'scheme': 'basic', 'principal': 'neo4j', 'credentials': '*******'}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,584 [#D252] _: <CONNECTION> client state: AUTHENTICATION > READY
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,605 [#D252] S: SUCCESS {'server': 'Neo4j/5.19.0', 'connection_id': 'bolt-855', 'hints': {'connection.recv_timeout_seconds': 120}}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,605 [#D252] _: <CONNECTION> server state: CONNECTED > AUTHENTICATION
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,606 [#D252] S: SUCCESS {}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,606 [#D252] _: <CONNECTION> server state: AUTHENTICATION > READY
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,606 [#D252] C: BEGIN {'mode': 'r', 'db': 'neo4j'}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,606 [#D252] _: <CONNECTION> client state: READY > TX_READY_OR_TX_STREAMING
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,627 [#D252] S: SUCCESS {}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,627 [#D252] _: <CONNECTION> server state: READY > TX_READY_OR_TX_STREAMING
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,627 [#D252] C: RUN 'RETURN 1 AS n' {} {}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,627 [#D252] C: PULL {'n': 1000}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:39:48,649 [#D252] S: SUCCESS {'t_first': 1, 'fields': ['n'], 'qid': 0}
2024-06-25 10:39:48.649296 Initial connection Successful. Sleeping for 4 minutes ...
2024-06-25 10:40:48.708936 Still running. Sleeping for 3 more minute(s) ...
2024-06-25 10:41:48.767131 Still running. Sleeping for 2 more minute(s) ...
2024-06-25 10:42:48.826472 Still running. Sleeping for 1 more minute(s) ...
2024-06-25 10:43:48.885922 Awake now. Checking the connection ...
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,886 [#D252] C: RUN 'RETURN 1 AS n' {} {}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,886 [#D252] C: PULL {'n': 1000}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,886 [#D252] S: RECORD * 1
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,887 [#D252] S: SUCCESS {'type': 'r', 't_last': 0, 'db': 'neo4j'}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,908 [#D252] S: SUCCESS {'t_first': 0, 'fields': ['n'], 'qid': 1}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,909 [#D252] S: RECORD * 1
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,909 [#D252] S: SUCCESS {'type': 'r', 't_last': 0, 'db': 'neo4j'}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,909 [#D252] C: COMMIT
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,909 [#D252] _: <CONNECTION> client state: TX_READY_OR_TX_STREAMING > READY
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,932 [#D252] S: SUCCESS {'bookmark': 'FB:kcwQwnqeYaVaR+Ou4O2V5AMTvskP6ZA='}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,932 [#D252] _: <CONNECTION> server state: TX_READY_OR_TX_STREAMING > READY
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,932 [#D252] _: <POOL> released bolt-855
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,933 [#0000] _: <POOL> close
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,933 [#D244] C: GOODBYE
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,933 [#D244] C: <CLOSE>
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,933 [#D252] C: GOODBYE
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,933 [#D252] C: <CLOSE>
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,933 [#0000] _: <POOL> close
2024-06-25 10:43:48.933997 The connection was valid after 240 seconds of idle time...
As you can see, the connection works perfectly until the 4-minute mark (240 seconds)
And here are the log entries for the connection resulting in failure after 5 minutes:(300 seconds)
2024-06-25 10:43:48.934329 Checking connection lifetime of 300 seconds
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,934 [#0000] _: <POOL> created, routing address IPv4Address(('<neo4j_FQDN>', 7687))
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,934 [#0000] _: <POOL> acquire routing connection, access_mode='READ', database='neo4j'
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,935 [#0000] _: <ROUTING> checking table freshness (readonly=True): table expired=True, has_server_for_mode=False, table routers={IPv4Address(('<neo4j_FQDN>', 7687))} => False
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,935 [#0000] _: <POOL> attempting to update routing table from IPv4Address(('<neo4j_FQDN>', 7687))
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,935 [#0000] _: <RESOLVE> in: <neo4j_FQDN>:7687
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,938 [#0000] _: <RESOLVE> dns resolver out: <IP_ADDR>:7687
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,939 [#0000] _: <POOL> _acquire router connection, database='neo4j', address=ResolvedIPv4Address(('<IP_ADDR>', 7687))
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,939 [#0000] _: <POOL> trying to hand out new connection
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,939 [#0000] C: <OPEN> <IP_ADDR>:7687
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,958 [#9CA4] C: <MAGIC> 0x6060B017
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,958 [#9CA4] C: <HANDSHAKE> 0x00040405 0x00020404 0x00000104 0x00000003
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,976 [#9CA4] S: <HANDSHAKE> 0x00000405
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,977 [#9CA4] C: HELLO {'user_agent': 'neo4j-python/5.19.0 Python/3.10.13-final-0 (linux)', 'routing': {'address': '<neo4j_FQDN>:7687'}, 'bolt_agent': {'product': 'neo4j-python/5.19.0', 'platform': 'Linux 6.5.0-1021-azure; x86_64', 'language': 'Python/3.10.13-final-0', 'language_details': 'CPython; 3.10.13-final-0 (main, Mar 21 2024 17:51:02) [GCC 9.4.0]'}}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,977 [#9CA4] _: <CONNECTION> client state: CONNECTED > AUTHENTICATION
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,977 [#9CA4] C: LOGON {'scheme': 'basic', 'principal': 'neo4j', 'credentials': '*******'}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,977 [#9CA4] _: <CONNECTION> client state: AUTHENTICATION > READY
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,996 [#9CA4] S: SUCCESS {'server': 'Neo4j/5.19.0', 'connection_id': 'bolt-856', 'hints': {'connection.recv_timeout_seconds': 120}}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,996 [#9CA4] _: <CONNECTION> server state: CONNECTED > AUTHENTICATION
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,997 [#9CA4] S: SUCCESS {}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,997 [#9CA4] _: <CONNECTION> server state: AUTHENTICATION > READY
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:48,997 [#9CA4] C: ROUTE {'address': '<neo4j_FQDN>:7687'} () {'db': 'neo4j'}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,016 [#9CA4] S: SUCCESS {'rt': {'servers': [{'addresses': ['<neo4j_FQDN>:7687'], 'role': 'WRITE'}, {'addresses': ['<neo4j_FQDN>:7687'], 'role': 'READ'}, {'addresses': ['<neo4j_FQDN>:7687'], 'role': 'ROUTE'}], 'ttl': 300, 'db': 'neo4j'}}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,016 [#9CA4] _: <POOL> released bolt-856
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,017 [#0000] _: <ROUTING> updated table=RoutingTable(database='neo4j' routers={IPv4Address(('<neo4j_FQDN>', 7687))}, readers={IPv4Address(('<neo4j_FQDN>', 7687))}, writers={IPv4Address(('<neo4j_FQDN>', 7687))}, last_updated_time=2223.343346232, ttl=300)
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,017 [#0000] _: <POOL> update routing table from address=ResolvedIPv4Address(('<IP_ADDR>', 7687)) (RoutingTable(database='neo4j' routers={IPv4Address(('<neo4j_FQDN>', 7687))}, readers={IPv4Address(('<neo4j_FQDN>', 7687))}, writers={IPv4Address(('<neo4j_FQDN>', 7687))}, last_updated_time=2223.343346232, ttl=300))
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,017 [#0000] _: <POOL> acquire address, database='neo4j' address=IPv4Address(('<neo4j_FQDN>', 7687))
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,017 [#0000] _: <POOL> trying to hand out new connection
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,017 [#0000] _: <RESOLVE> in: <neo4j_FQDN>:7687
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,021 [#0000] _: <RESOLVE> dns resolver out: <IP_ADDR>:7687
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,021 [#0000] C: <OPEN> <IP_ADDR>:7687
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,043 [#9CB4] C: <MAGIC> 0x6060B017
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,043 [#9CB4] C: <HANDSHAKE> 0x00040405 0x00020404 0x00000104 0x00000003
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,064 [#9CB4] S: <HANDSHAKE> 0x00000405
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,064 [#9CB4] C: HELLO {'user_agent': 'neo4j-python/5.19.0 Python/3.10.13-final-0 (linux)', 'routing': {'address': '<neo4j_FQDN>:7687'}, 'bolt_agent': {'product': 'neo4j-python/5.19.0', 'platform': 'Linux 6.5.0-1021-azure; x86_64', 'language': 'Python/3.10.13-final-0', 'language_details': 'CPython; 3.10.13-final-0 (main, Mar 21 2024 17:51:02) [GCC 9.4.0]'}}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,065 [#9CB4] _: <CONNECTION> client state: CONNECTED > AUTHENTICATION
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,065 [#9CB4] C: LOGON {'scheme': 'basic', 'principal': 'neo4j', 'credentials': '*******'}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,065 [#9CB4] _: <CONNECTION> client state: AUTHENTICATION > READY
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,086 [#9CB4] S: SUCCESS {'server': 'Neo4j/5.19.0', 'connection_id': 'bolt-857', 'hints': {'connection.recv_timeout_seconds': 120}}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,086 [#9CB4] _: <CONNECTION> server state: CONNECTED > AUTHENTICATION
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,087 [#9CB4] S: SUCCESS {}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,087 [#9CB4] _: <CONNECTION> server state: AUTHENTICATION > READY
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,087 [#9CB4] C: BEGIN {'mode': 'r', 'db': 'neo4j'}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,087 [#9CB4] _: <CONNECTION> client state: READY > TX_READY_OR_TX_STREAMING
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,108 [#9CB4] S: SUCCESS {}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,109 [#9CB4] _: <CONNECTION> server state: READY > TX_READY_OR_TX_STREAMING
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,109 [#9CB4] C: RUN 'RETURN 1 AS n' {} {}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,109 [#9CB4] C: PULL {'n': 1000}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:43:49,130 [#9CB4] S: SUCCESS {'t_first': 0, 'fields': ['n'], 'qid': 0}
2024-06-25 10:43:49.131059 Initial connection Successful. Sleeping for 5 minutes ...
2024-06-25 10:44:49.190208 Still running. Sleeping for 4 more minute(s) ...
2024-06-25 10:45:49.245722 Still running. Sleeping for 3 more minute(s) ...
2024-06-25 10:46:49.301758 Still running. Sleeping for 2 more minute(s) ...
2024-06-25 10:47:49.358960 Still running. Sleeping for 1 more minute(s) ...
2024-06-25 10:48:49.417797 Awake now. Checking the connection ...
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:48:49,418 [#9CB4] C: RUN 'RETURN 1 AS n' {} {}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:48:49,419 [#9CB4] C: PULL {'n': 1000}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:48:49,419 [#9CB4] S: RECORD * 1
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:48:49,425 [#9CB4] S: SUCCESS {'type': 'r', 't_last': 0, 'db': 'neo4j'}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:50:49,521 [#9CB4] _: <CONNECTION> error: TimeoutError('timed out')
[ERROR ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:50:49,522 Failed to read from defunct connection IPv4Address(('<neo4j_FQDN>', 7687)) (ResolvedIPv4Address(('<IP_ADDR>', 7687)))
ERROR:neo4j.io:Failed to read from defunct connection IPv4Address(('<neo4j_FQDN>', 7687)) (ResolvedIPv4Address(('<IP_ADDR>', 7687)))
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:50:49,522 [#9CB4] C: <CLOSE>
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:50:49,522 [#0000] _: <POOL> deactivating address IPv4Address(('<neo4j_FQDN>', 7687))
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:50:49,522 [#0000] _: <POOL> table={'neo4j': RoutingTable(database='neo4j' routers={}, readers={}, writers={}, last_updated_time=2223.343346232, ttl=300)}
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:50:49,522 [#9CB4] _: <POOL> released bolt-857
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:50:49,522 [#0000] _: <POOL> close
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:50:49,522 [#9CA4] C: GOODBYE
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:50:49,523 [#9CA4] C: <CLOSE>
2024-06-25 10:50:49.523183 Session Expired for connection with idle time of 300 seconds
[DEBUG ] [Thread 130688205369984] [TASK NONE] 2024-06-25 10:50:49,523 [#0000] _: <POOL> close
2024-06-25 10:50:49.523453 The connection FAILED after 300 seconds of idle time...
2024-06-25 10:50:49.523661 Recommended Connection lifetime : 230 seconds or lesser
2024-06-25 10:50:49.523751 The longest running valid connection was 240 seconds old.
2024-06-25 10:50:49.523829 The recommended value is 10 seconds lesser than this
Based on your suggestion, I expected NOOP messages to keep the connection alive, but I haven't observed any such messages in the logs.
Could you provide further guidance on how to ensure connections remain active for the desired period and how to properly configure the NOOP messages if necessary? Additionally, is there any other configuration or driver setting that I might be overlooking?
Thank you for your assistance!