OK, I think I have reproduced the problem. The issue is pretty specific, it requires some extremely fast queries coming with high degree of concurrency so that the queries would run faster than a background thread to perform one particular kind of cleanup. I will create a ticket about it.
As a workaround I can suggest two options:
- less concurrency (how much less depends on the number of cores on your machine)
- add
kernel.event.dispatch.async=false
to yourstardog.properties
and restart the server. The queries will probably run a little slower (since the cleanup will be synchronous) but that should eliminate the backlog.
Let us know if that helps,
Pavel