waku-org / nwaku

Waku node and protocol.
Other
202 stars 53 forks source link

chore: store node loses connection if database restarts #2989

Closed Ivansete-status closed 1 month ago

Ivansete-status commented 2 months ago

Background

After restarting the database, the store node doesn't connect again. Instead, it shows the following message until manually restarting the nwaku node:

nim-waku-store | ERR 2024-08-20 14:41:15.857+00:00 failed to insert message topics="waku archive" tid=1 file=archive.nim:108 error="could not put msg in messages table: error in runStmt: error in dbConnQueryPrepared calling sendQuery: failed pqsendQueryPrepared: no connection to the server\n"

jakubgs commented 2 months ago

Indeed, it appears only the insert code shows this behavior as we can see on this graph:

image

Because the query path continued to send statements the DB:

image