Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
fixed ObjectPoolMaxLimitReachedException for many reader threads #1737
I posted my error here before:
So basically we have a high load of reading events from EventStore. So we need more reader threads. But when we use E.g. 16 Threads (ReaderThreadsCount=16) we have a lot of
I changed the creation of the readerPool to take notice of how many reader threads are needed.
It should basically work, but I'm not 100% sure.
left a comment
Successfully reproduced the issue with code below:
Also modified ObjectPool.cs to add a small delay of 10ms when returning items to the object pool to make the issue more likely to happen. You can also monitor the
The number of reader threads has a direct relationship with the number of requesters on the "ReadIndex readers pool" object pool:
With this fix, we will actually have