How can we deal if Users are exceeded to connection pool size
Joined: Jun 24, 2008
Hi to all,
I came across the question in an interview. The scenario like this,
for example our connection pool size is: 200. Currently 200 users (all Active users) are accessing the site.
What is going to happen if a new user(201th user) is going to access the site.
How can we deal the situation?
Discuss all situations we need to take care of, when we came across this situation.
One thing I can think of, reduce the scope to minimum in which the connections are used in the application (of course this is in the code level). But as with your statement if all 200 connections are in use at the same time then the next user will simple have to wait.
I think it's unlikely that all 200 users will access the web app in a way so that 200 connections will be open at the same time. While it's a possibility (and obviously depends on the application), I'd say that a pool of size 50 should be plenty big enough to serve 200 simultaneous users.
Most likely, I wouldn't make the pool bigger than 50 (rather smaller), because the DB is not going to be particularly responsive it if has to handle 50 queries at the exact same time.