Skip to content

[Postgres driver] sending 5 queries = error #2091

@ExtReMLapin

Description

@ExtReMLapin

Hello !

When sending 5 queries queued with postgres driver it errors :

mars 25 14:15:28 cfia01 server.sh[255547]: 2025-03-25 14:15:28.130 INFO  [ArcadeDBServer] <ArcadeDB_0> - Postgres plugin started
mars 25 14:15:28 cfia01 server.sh[255547]: 2025-03-25 14:15:28.130 INFO  [HttpServer] <ArcadeDB_0> - Starting HTTP Server (host=0.0.0.0 port=2480-2489 httpsPort=2490-2499)...
mars 25 14:15:28 cfia01 server.sh[255547]: 2025-03-25 14:15:28.162 INFO  [undertow] starting server: Undertow - 2.3.18.Final
mars 25 14:15:28 cfia01 server.sh[255547]: 2025-03-25 14:15:28.168 INFO  [xnio] XNIO version 3.8.16.Final
mars 25 14:15:28 cfia01 server.sh[255547]: 2025-03-25 14:15:28.173 INFO  [nio] XNIO NIO Implementation Version 3.8.16.Final
mars 25 14:15:28 cfia01 server.sh[255547]: 2025-03-25 14:15:28.191 INFO  [threads] JBoss Threads version 3.5.0.Final
mars 25 14:15:28 cfia01 server.sh[255547]: 2025-03-25 14:15:28.245 INFO  [HttpServer] <ArcadeDB_0> - HTTP Server started (host=0.0.0.0 port=2480 httpsPort=2490)
mars 25 14:15:28 cfia01 server.sh[255547]: 2025-03-25 14:15:28.246 INFO  [ArcadeDBServer] <ArcadeDB_0> Available query languages: [sqlscript, mongo, gremlin, java, cypher, js, graphql, sql]
mars 25 14:15:28 cfia01 server.sh[255547]: 2025-03-25 14:15:28.247 INFO  [ArcadeDBServer] <ArcadeDB_0> ArcadeDB Server started in 'development' mode (CPUs=32 MAXRAM=29,97GB)
mars 25 14:15:53 cfia01 server.sh[255547]: 2025-03-25 14:15:28.260 INFO  [ArcadeDBServer] <ArcadeDB_0> Studio web tool available at http://192.168.25.25:2480 Unexpected message type '
mars 25 14:15:53 cfia01 server.sh[255547]: ' for message any
mars 25 14:15:53 cfia01 server.sh[255547]: com.arcadedb.postgres.PostgresProtocolException: Unexpected message type '
mars 25 14:15:53 cfia01 server.sh[255547]: ' for message any
mars 25 14:15:53 cfia01 server.sh[255547]:         at com.arcadedb.postgres.PostgresNetworkExecutor.readMessage(PostgresNetworkExecutor.java:1057)
mars 25 14:15:53 cfia01 server.sh[255547]:         at com.arcadedb.postgres.PostgresNetworkExecutor.run(PostgresNetworkExecutor.java:165)

Using latest release,

Python code to reproduce :

import psycopg

db_string_test = 'TEST_DATABASE'

count = 100
import time
with psycopg.connect(user="root", password="rootroot",
                    host='localhost',
                    port='5432',
                    dbname=db_string_test,
                    sslmode='disable'
                    ) as connection:
    
    connection.autocommit = True
    with connection.cursor() as cursor:
        cursor.execute("create vertex type `TEXT_EMBEDDING` if not exists;")
        
        cursor.execute("create property TEXT_EMBEDDING.str if not exists STRING;")
        cursor.execute("create property TEXT_EMBEDDING.embedding if not exists ARRAY_OF_FLOATS;")
    with connection.cursor() as cursor:
        for i in range(count):
            print(i)
            time.sleep(1)
            cursor.execute("INSERT INTO `TEXT_EMBEDDING` SET str = \"meow\", hash = [0.1, 0.2, 0.3] RETURN @rid")
            cursor.fetchall()
    
Traceback (most recent call last):
  File "/home/xxx/idextend/test_psgg.py", line 24, in <module>
    cursor.execute("INSERT INTO `TEXT_EMBEDDING` SET str = \"meow\", hash = [0.1, 0.2, 0.3] RETURN @rid")
  File "/home/xxx/idextend/venv/lib/python3.10/site-packages/psycopg/cursor.py", line 97, in execute
    raise ex.with_traceback(None)
psycopg.OperationalError: consuming input failed: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions