Wolfgang,
I guess this is likely unrelated, but the only moment I see this happen is when our (Linux) servers go down (like in a cronned shutdown -r now). This draws resources (in our case the local database client) away from under the feet of our image/vm and results in an AcoError 1004.
Afaik, you are on Windows, so it is probably best to see whether "something suspicious" can be found in your event logs, maybe some service is being torn down or restarted for whatever reason... I guess you already checked if you've got a concurrency problem where some green thread frees some resource while another one is using it. For such cases, logging is probably the best and only option you have to at least understand IF that is the case. Finding out WHY it happens is probably much harder. I know you guys are much more literate with such issues than I am, so this maybe the two most naive things you did long before posting to this form ;-)
Joachim