Hi Zack,

thanks for your message - and the awesome basexerl lib :)

The error seems to occur regardless of the client that is used to connect, whenever an attempt is made to add a document to the database. It happens even in the basex CLI client.

The database seems to be in a corrupted state, even though running checks (INSPECT) doesn’t report any inconsistencies.

Since the database is mainly used as an archive for XML docs and as a query processor that is only invoked shortly after XML docs have been added I could „solve“ the problem by creating a new, empty database. Of course this will also reset the archive and is not a satisfactory solution since we didn’t change anything in the code and setup, and the problem could happen again anytime.

There are no clients connected to the old database (checked using SHOW SESSIONS), and the problem still occurs.

The issue does not occur in the new database. Before the error happened, the production system was stable for about half a year. It didn’t happen during development either.

This means that I cannot easily provide instructions to reproduce the problem. We’ll see if the problem happens again when we hit the same number of XML documents. I’ll also try to reproduce the problem by implementing some tests that simulate high load and create a large number of XML documents.

Maybe it is a problem related to the server environment (permissions, max. file size etc.), although I couldn’t see any exceedingly large file in the data directory, and a system like BaseX should easily cope with ~500.000 XML documents.

There was a GitHub issue regarding a "lock file does not exist" (https://github.com/BaseXdb/basex/issues/702), but it happened on db:optimize - so under different circumstances - and has already been closed.

Anyway, I contacted this mailing list since the error message hinted at „Improper use? Potential bug? Your feedback is welcome“.

Thanks for your efforts, Zack!

I will report back if I discover anything new regarding this problem.

Any hints or suggestions on what I could do to solve the problem would be very welcome.

Thanks,
Thomas

On 2 Jan 2021, at 19:07, Zachary N. Dean wrote:

Hi Thomas,

 

Author of the Erlang client here. :-)

 

I haven’t seen this before, but I haven’t used pooled connections either.

 

Is there a minimal example for the commands that you run that I could use to reproduce this and ensure it’s not a problem in the client?

 

Thanks,

 

Zack