Hi Damir,
for clarity, the exception:
- Code: Select all
2019-01-24 11:03:08,689 INFO [ ome.services.util.ServiceHandler] (.Server-16) Excp: ome.conditions.DatabaseBusyException: Cannot acquire connection
in your log points to the db pool as being the first bottleneck. What's happening is that long-running transactions have blocked all DB access at which point OMERO can't do any work. I'd typically except OMERO to eventually recover from the DoS but it can take some time.
Increasing poolsize (below) in this particular case is likely to help since the user is trying 64 exports, but higher numbers will show a similar issue. On the development side, exports need to be moved to a background thread which can be more strongly controlled (limit of 5 or 10). One choice we've made ourselves with the IDR on the sysadmin side is to limit the absolute time of transactions to prevent DoS'ing. You can see this configuration in
idr/deployment. Do note however that this could impact other users' calls as well.
dsudar wrote:Thanks for the quick response. Indeed the max_threads was at the default 50 while the user was trying to run 64 requests at the same time. So I'll at least double max_threads (to 100) and background_threads (to 20).
With the addition of more backgrounded activities (including export), we'll provide more advice on these settings. In general, I wouldn't expect these to particularly apply in this situation, not the least of which due to the additional Ice settings:
- Code: Select all
<properties id="MultiThreaded">
<property name="Ice.ThreadPool.Client.Size" value="2"/>
<property name="Ice.ThreadPool.Client.SizeMax" value="50"/>
<property name="Ice.ThreadPool.Server.Size" value="10"/>
<property name="Ice.ThreadPool.Server.SizeMax" value="100"/>
</properties>
I'm a bit confused about db.poolsize: in the note on page:
https://docs.openmicroscopy.org/omero/5 ... onfig.htmlit says that the default is 10 (which I hadn't changed) but that it should be a larger value than max_threads? I'll increase that value to 50 and also increase the postgresql.conf max_connections value to 200 from the original 100. Are there some good rules-of-thumb what good values should be?
Really, the higher the better. Each postgresql connection requires resources which is why these defaults are as low as they are. If your postgresql server is happy running with 200 then that seems like a good value, and I'd imagine you can give 80%+ to OMERO via omero.db.pool_size as long as postgresql is not being used for any other production resources.
Cheers,
~Josh