Oracle 中的 IDLE 超时参数

IDLE timeout parameter in Oracle(Oracle 中的 IDLE 超时参数)
本文介绍了Oracle 中的 IDLE 超时参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们陷入了这样一种情况,即我们的一个进程在不接触数据库的情况下需要 3 小时的计算.Oracle 服务器和任何后续查询或提交关闭了在调用进程之前建立的连接抛出连接关闭异常.

We are stuck in a situation where one of our processes is taking 3 hours of computing without touching the database. The connection that was taken before calling the process gets closed by the Oracle server and any subsequent query or commit throws connection closed exception.

在我们看来,问题与 Oracle 出于某种原因关闭了长时间空闲的连接有关.

It appears to us that the problem is related to Oracle closing the connection that is idle for that long for some reason.

我们尝试在 sqlnet.ora 中更改 EXPIRE_TIMEOUT,但这也无济于事.

We tried changing EXPIRE_TIMEOUT in sqlnet.ora but that didn't help either.

我们可以做些什么来解决这个问题?

What can we do to resolve this problem?

推荐答案

尝试使用连接时遇到什么错误?

What is the error you get when you try to use the connection?

默认情况下,Oracle 不会因为不活动而关闭连接.您可以使用 IDLE_TIME 配置配置文件以使 Oracle 关闭非活动连接,但听起来您并没有这样做.您还可以配置 Oracle 以检测死连接并在客户端没有响应时关闭连接——如果客户端被埋三个小时,它可能没有及时响应.但这似乎不太可能是广告需要额外的配置步骤.

Oracle by default will not close a connection due to inactivity. You can configure a profile with an IDLE_TIME to cause Oracle to close inactive connections, but it doesn't sound like you've done that. You can also configure Oracle to detect dead connections and close the connection if the client doesn't respond-- if the client is buried for three hours, it's possible that it's not responding in a timely fashion. But that seems less likely ad requires additional configuration steps.

根据我的经验,更有可能的情况是您的网络正在断开连接.例如,如果您通过防火墙进行连接,防火墙会频繁关闭空闲时间过长的连接.

The more likely situation in my experience is that your network is dropping the connection. If you are connecting via a firewall, for example, the firewall will frequently close connections that have been idle too long.

您收到的实际 Oracle 错误消息将指出这些替代方案中的哪一个导致了您的问题.

The actual Oracle error message you are receiving will indicate which of these alternatives is causing your problem.

这篇关于Oracle 中的 IDLE 超时参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

SQL to Generate Periodic Snapshots from Transactions Table(用于从事务表生成定期快照的SQL)
How to make node.js mysql connection pooling available on startup(如何使node.js MySQL连接池在启动时可用)
MyBatis support for multiple databases(MyBatis支持多个数据库)
Oracle 12c SQL: Missing column Headers in result(Oracle 12c SQL:结果中缺少列标题)
SQL query to find the number of customers who shopped for 3 consecutive days in month of January 2020(查询2020年1月连续购物3天的客户数量)
How to get top 10 data weekly (This week, Previous week, Last month, 2 months ago, 3 month ago)(如何每周获取前十大数据(本周、前一周、上个月、2个月前、3个月前))