I have a restxq web service to do insert or update xml doc , which is called by many clients to provide xml data to db, there will be 500000 files to provide to basex server. I have found some problem few times :
What version of BaseX are you working with? Have you tried the latest snapshot?