PoolAcquireException - Possible errors in the PC system

Hello Wagner,

What could be the reasons for this error.
"PoolAcquireException"
"Cannot retrieve object from object pool."
See grafic.

This server has been running unchanged for many months.

Today this error. When the page is reloaded everything works.!!
Only the first call makes the error.

Today I had to make a small change to my internet router. Just a change to the DHCP IP range.
My development system runs in Windows 10 vmWare. Also the REST servers. Only the database runs on the host system.

Where does the error come from? Could this have something to do with the configuration of the hardware?
I've never seen this before.

Thomas

This error happens when the app tries to retrieve a database connection from the pool, but there aren't more available. It waits a while for a connection to be available. If it times out, such error appears.

The causes can be multiple, but the most common are:

  1. Your server load is high, many clients asking for requests at the same time, and the pool is too small to handle the requests. In this case, the problem is temporary, it usually goes away by itself quickly, especially if the server load gets lower. You shouldn't worry about it, and if it start happens frequently, you can just increase the size of the pool.

  2. Your code is buggy and you are not always retrieving a connection back to the pool after you get it. This usually happens with memory leaks. For example, you create an object manager that uses such connection and then never destroyed the object manager. The connection will be take forever. Eventually, the pool run out of connections and nothing works anymore. The requests can't be processed anymore. This is a permanent situations and is only solved if you restart the server - but eventually will happen again, until you fix the bug.

1 Like

No, there was another reason.

“Bitdefender Internet Security” had an update

and reset the "hosts" file.
(Automatic reset after each change)

This caused the internal name resolution (DNS) to the database server to be extremely slow.
The error was a database timeout

The message was just confusing.
But maybe there were multiple messages and only one (the last one) was displayed.

Thanks for the follow up.
But well, your situations falls into the scenario 1 I mentioned.
Maybe my wording was not generic enough, but in general, it means that your server is not capable of handle all the requests. That's what happened, your database connections became slow, so your server suddenly was not able to handle all the requests coming to it. Anyway, I'm glad you solved it.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.