Hi there,
I’m using a MariaDB query as the data source for the Manticore indexer
. My source config contains a multi-value field of type sql_attr_multi
, which causes my MariaDB database to throw the following warning when the indexer starts building (or rebuilding) a table:
[Warning] Aborted connection 11 to db: 'dbname' user: 'user' host: 'localhost' (Got an error writing communication packets)
I first suspected this error is related to a query that is running too long. However, the warning appears at the very beginning of the indexing process. And the process finishes without any errors reported on the Manticore side.
I turned on verbose query logging in MariaDB, and I see something very odd. The indexer
is executing three queries:
240617 20:47:05 11 Connect user@localhost on dbname using Socket
11 Query [Main SQL query - first run]
12 Connect user@localhost on dbname using Socket
12 Query [sql_attr_multi query]
240617 20:47:06 12 Quit
13 Connect user@localhost on dbname using Socket
13 Query [Main SQL query - second run]
240617 20:49:01 13 Quit
It starts by connecting to MariaDB and running the SQL query in the sql_query
config parameter (which I labeled above as “Main SQL query”). Immediately after – and without correctly terminating that connection – it aborts and connects again to run the query contained in the sql_attr_multi
parameter. That session is ended correctly. Finally, the indexer
connects one last time and runs the sql_query
, allowing that query to run to completion.
So, we have three Connects, and just two Quits, which explains the MariaDB warning.
As I mentioned, I get no errors in Manticore, and the generated table seems to work properly. But on the MariaDB side, the query log shows an error for that first aborted query:
2024-06-17 20:47:05 user[user] @ localhost [] ERROR 1160: Got an error writing communication packets : [Main SQL query]
If I comment out the sql_attr_multi
parameter in my config, the warning goes away, and just a single query is sent to MariaDB. I’ve been able to reproduce this behavior on several systems.
I suppose this is just a cosmetic issue, but it seems rather odd. Is it something I could be concerned about, or possibly a bug in the indexer
?
Thank you very much for any help!