如何设置Oracle连接池大小?
最近,我们的 ASP.NET 网站经常收到此 Oracle 连接池异常。这是详细的异常消息:
超时已过。超时时间 在获得之前已过去 来自池的连接。这可能 发生的原因是所有的 连接正在使用中并且最大池 已达到大小。
这是我们的连接字符串,
User ID=user1;password=password1;DATA SOURCE=Datasource1
您能告诉我如何将最大池大小设置为 1 以便我可以在本地调试它吗?
另一个问题是:对于拥有 10,000 个用户的网站,建议的池大小是多少?如果达到最大池大小,如何优雅地失败?
多谢!
We have been getting this Oracle connection pool exception a lot recently for our ASP.NET website. This is the detailed exception message:
Timeout expired. The timeout period
elapsed prior to obtaining a
connection from the pool. This may
have occurred because all pooled
connections were in use and max pool
size was reached.
This is our connection string
User ID=user1;password=password1;DATA SOURCE=Datasource1
Can you tell me how to set max pool size to 1 so that I can debug it on my local?
Another question is: what is the recommended pool size for a website with 10,000 users? and if max pool size is reached, how to fail gracefully?
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经使用这样的连接字符串来设置连接池大小:
但是您不需要将连接池大小设置得更大。当我忘记关闭连接时,我收到了这样的错误消息。检查代码以查找打开连接但不要关闭连接的位置。 它可以帮助您。
I have used such connection string to set the connection pool size:
But you don't need to set connection pool size bigger. Such error message I have got when I forget to close connections. Check your code to find places where you open connections, but don't close them. It can help you.