Hello,
I’m having some problems with BaseX in situations where there it runs out of disk space.
I’m delivering XML files to BaseX 8.4 using RestXQ.
A request is made and the XML is added to a database depending on some criteria. I receive many hundreds of thousands of requests and everything works well unless I run out of disk space.
What I would expect to happen is that BaseX would try to add the document, find it couldn’t due to the disk being full and return a server error (e.g. 500) and the transaction would be aborted leaving the database as it was before the request. Any further requests would all get errors returned.
What I’m seeing is that when a request is made that causes the disk to become full BaseX gets part way through adding the document, fails and returns an error but also leaves the database corrupted. Usually the server has to be restarted and then any database that has been affected has to be deleted - it’s rare to be able to save anything from it.
The errors vary but it is usually a NullPointer exception and then java.nio.channels.OverlappingFileLockException. for further requests.
I’ve tried turning off logging and setting parallel to 1 to see if that made any difference but it doesn’t.
Is what I’m seeing unique to my setup or do others see this?
Is there anything I can do to make BaseX just stop accepting requests when disk space runs out to protect my databases?
Many thanks, James