about a month ago I wrote about our issues using XUpdate with exist, querying from PHP/SOAP Interface. To cut a long story short: we use eXist to store xml documents which build a project database. After about a week of work, eXist crashes and leaves us with scrambled indices - XQueries deliver wrong/empty results and the database keeps crashing with "Signal 11". Reindexing the documents - even after the first crash - did not help us. Reinstall and restore from backup was the only way to get back to work. Btw: our documents are not terribly big (about 10-20KB).
Though the last snapshot brought a huge gain in terms of stability, our problems are still the same - the database's "lifespan" is now about 10+ days. So I wrote a little PHP program which inserts and queries randomly generated tags into a document and stupidly repeats this process as often as configured. The Database was crashing after about 8.000-10.000 XUpdates. Wolfgang Meier rewrote this little test in Java, but could not reproduce our issues.
Since I used the SOAP interface for queries and Wolfgang Meier used the Java API (at least I think so :) I thought maybe switching to the REST-API would help. I adapted the test and started it yesterday at about 3pm. When I arrived today the database was still up and running, no warnings, no crash. but there's one thing that keeps me from squealing with glee: I've sceduled 10.000 Updates and they are still running - but one XUpdate takes about 90(!) seconds! Since the document still is only 250KB in size I wonder why querying is so slow?
I thought the slowdown may be linked with the document and decided to store it in another collection and retry with a new document. I renamend th collection using webdav, recreated the old one, and now the document is gone, hmmmm :( I opened it before renaming the collection and it had about 7.000 lines of tags in it (250KB as mentioned before). In case you wonder where the other tags have gone: the PHP program randomly deletes some nodes at the end of the script to mix indices up a bit :)
Finally, here's my question: anyone knows where to tweak to increase XUpdate performance?
Thanks for reading!
Best regards
Clemens Prerovsky