gpt4 book ai didi

oracle - Oracle session 与连接池的关系

转载 作者:行者123 更新时间:2023-12-03 01:24:14 25 4
gpt4 key购买 nike

让我先解释一下设置。

我们有一个在 2GB RAM 机器上运行的 Oracle 服务器。 Db 实例的初始化参数“sessions”设置为 160。

我们已将应用程序部署在 Websphere 6.1 上。连接池设置为最小 50 和最大 150。

当我们对 40 个用户运行负载测试(并发,使用 jMeter)时,一切顺利。但是当我们将并发用户增加到超过 60 时,Oracle 会抛出异常,提示 session 已满。

我们检查了应用程序是否存在任何连接泄漏,但没有发现任何连接泄漏。

那么这是否意味着40的并发是这个设置可以承受的?增加 Oracle session /进程是获得更高并发性的唯一方法吗?

数据库 session 和连接池中的连接究竟如何相关?根据我的理解,连接数不能超过 session 数,因此将最大连接池设置为超过 session 数可能并不重要。这是正确的吗?

最佳答案

Metalink 给出了有关 SESSIONS 参数的以下建议:

Recursive sessions are an essential part of the normal functioning of the RDBMS. It is impossible to identify every circumstance that would require such sessions, but in general, if a user-initiated operation requires the manipulation of data dictionary objects, then recursive sessions may get created. To take a simple example, say you create a table while logged in as some ordinary user. Behind the scenes this has to insert rows into obj$, tab$ etc which are owned by the SYS user. Since a normal user would have no privilege to insert into these objects, a recursive session is created which logs in as SYS.

Solution:

Increase the SESSIONS parameter.

Recommendation is to preserve 50% of the SESSIONS value for recursive sessions. So, for example if it is expected to have 30 client sessions open, then set the SESSIONS parameter to 60.

因此,根据 websphere 和您的用户进程正在执行的操作,这可以部分解释您所看到的内容。

关于oracle - Oracle session 与连接池的关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1039637/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com