Oracle Connection Pooling in .Net

断了今生、忘了曾经 提交于 2019-12-19 05:43:35

问题


We have a system that uses an Oracle database. I've been asked if the system makes use of connection pooling which I'm not sure about.

We are using the Oracle.DataAccess.Client.OracleConnection

When reading up on the subject I've found that connection pooling is set to true in the connection string and that it is set to true by default.

Our connection string does not include any pooling settings. Does this imply that we are using pooling and if so what would the default min and max pool size be? I've not been able to find any information on what these values would be in the case of using connection pooling implicitly (i.e. not specified in the connection string).


回答1:


Connection pooling is turned on by default as specified in the official ODP.NET documentation on Connection String Attributes (default: Pooling = true).

So, if your connection string omits any kind of connection pool setting, you will get a connection pool with the following basic default settings, again based on that same official ODP.NET documentation page on Connection String Attributes:

  • Connection Timeout = 15: Maximum time (in seconds) to wait for a free connection from the pool.
  • Decr Pool Size = 1: Number of connections that are closed when an excessive amount of established connections are unused.
  • Incr Pool Size = 5: Number of new connections to be created when all connections in the pool are in use.
  • Max Pool Size = 100: Maximum number of connections in a pool.
  • Min Pool Size = 1: Minimum number of connections in a pool.

The documentation mentions other interesting default pool values as well that you may want to read about as well.



来源:https://stackoverflow.com/questions/47496365/oracle-connection-pooling-in-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!