oracle “ORA-12571:TNS 数据包写入器失败”和“ORA-03135:连接丢失联系”有什么区别?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2655666/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the difference between "ORA-12571: TNS packet writer failure" and "ORA-03135: connection lost contact"?
提问by Philippe
I am working in an environment where we get production issues from time to time related to Oracle connections. We use ODP.NET from ASP.NET applications, and we suspect the firewall closes connections that have been in the connection pool too long.
我在一个环境中工作,我们不时遇到与 Oracle 连接相关的生产问题。我们使用来自 ASP.NET 应用程序的 ODP.NET,我们怀疑防火墙关闭了在连接池中的连接时间过长。
Sometimes we get an "ORA-12571: TNS packet writer failure" error, and sometimes we get "ORA-03135: connection lost contact."
有时我们会收到“ORA-12571:TNS 数据包写入器失败”错误,有时我们会收到“ORA-03135:连接丢失联系”。
I was wondering if someone has run into this and/or has an understanding of the difference between the 2 errors.
我想知道是否有人遇到过这个问题和/或了解这两个错误之间的区别。
回答by Achille
Using a mobile phone analogy:
使用手机类比:
- ORA-12571 (Failure) Means call is dropped.
- ORA-03135 (Connection Lost) Other party hung up.
- ORA-12571(失败)表示呼叫已中断。
- ORA-03135(连接丢失)对方挂断了。
回答by Igby Largeman
My understanding is that 3135 occurs when a connection is lost. This doesn't tell you why the connection was lost, though. It may have been terminated by the server because the server failed to recieve a response to a probe for a certain amount of time, and assumed that the connection was dead. Or (I'm not sure about this) the exact reverse of that: the client failed to recieve a probe response from the server for a certain amount of time, so it assumed the connection was lost. The "certain amount of time" is cotrolled by SQLNET.EXPIRE_TIME=[minutes] in sqlnet.ora.
我的理解是 3135 发生在连接丢失时。但是,这并不能告诉您连接丢失的原因。它可能已被服务器终止,因为服务器在一定时间内未能收到对探测的响应,并假设连接已失效。或者(我不确定这一点)正好相反:客户端在一段时间内未能收到来自服务器的探测响应,因此它假设连接丢失。“一定的时间”由 sqlnet.ora 中的 SQLNET.EXPIRE_TIME=[minutes] 控制。
As for 12571, my (again vague) understanding is that there was a sudden failure to send a packet during communication with the server, and that this is typically caused by some software or hardware interfering with the connection (either by design, or by error). For instance, if you pull out your ethernet cable and then try to execute a query, you'll probably get this. Or if a firewall or anti-malware application decides to block the traffic.
至于 12571,我(再次模糊)的理解是在与服务器通信的过程中突然无法发送数据包,这通常是由某些软件或硬件干扰连接引起的(无论是设计还是错误) )。例如,如果您拔出以太网电缆,然后尝试执行查询,您可能会得到这个。或者,如果防火墙或反恶意软件应用程序决定阻止流量。