ITPub博客

首页 > 数据库 > Oracle > 域名解析导致连接故障案例一则

域名解析导致连接故障案例一则

原创 Oracle 作者:a960549548 时间:2025-07-28 08:50:57 0 删除 编辑

某客户的一个数据库连接卡顿,具体体现在:

Lsnrctl status 要很久

客户端连接 要很久

Tnsping ip 要很久

TNS ping Utility for Linux: version 11.  Copyright (c) 1997, 2009, Oracle. All  used parameter files:  2.0.1.0 - production on 15-3UN-2020 13:51:55  rights reserved.  used HOSTNAME adapter to resolve the alias  tact 181) (PORT—1521)))  K 9 60 ms ec  ms ec  0K O msec

检查操作系统日志,无明显报错

检查数据库日志,报错如下:

Mon Jun 15 11:35:34 2020
WARN: ARC3: Terminating ARCH (pid 45650) hung on a network operation
Mon Jun 15 11:35:39 2020
WARN: ARC1: Terminating ARCH (pid 45650) hung on a network operation
Mon Jun 15 11:35:41 2020
WARN: ARC2: Terminating ARCH (pid 45650) hung on a network operation
krsv_proc_kill: Killing 249108103169 processes (Process by index)
ARC2: Error 16198 due to hung ARCH operation to 'orcldg'
ARC3: Error 16198 due to hung ARCH operation to 'orcldg'
ARC3: Detected ARCH process failure
ARC3: STARTING ARCH PROCESSES
ARC2: Becoming the heartbeat ARCH

该错误持续时间较长,暂时排除是该问题导致的

查看监听进程: ps -ef|grep tns
杀掉监听进程:kill -9 XXX
重启监听:lsnrctl start

再次检查连接,卡顿现象仍然存在

关闭数据库,关闭监听,重启数据库,卡顿现象仍然存在

无奈只能切换备库为主库接管业务,无卡顿现象,继续排查原主库的卡顿现象问题。

经过排查发现,是由于  dns  域名解析导致的连接卡顿。

11g: Persistent TNS-12537/ORA-609 Errors & LSNRCTL Hangs (Doc ID 1532481.1)        
There are numerous symptoms that can arise with this issue.
1)  The LSNRCTL utility is slow to respond or seems to hang indefinitely.
2)  Remote client connections are slow to respond or timeout.
3)  There are  frequently repeating ORA-609 errors in the alert.log while this problem is occurring
4)  The listener log might show the following errors being thrown repeatedly as client connections are failing:
 
TNS-12518: TNS:listener could not hand off client connection
 TNS-12547: TNS:lost contact
  TNS-12560: TNS:protocol adapter error
   TNS-00517: Lost contact
    Linux Error: 32: Broken pipe
 
CAUSE
This behavior may be due to the following unpublished BUG:
Bug 9593134 DNS or NIS mis-configuration can cause slow database connects
See also:
Note: 561429.1  DNS Issue: Connections To Oracle 11g are Slow or Delayed
Note: 9593134.8  - Bug 9593134 - DNS or NIS mis-configuration can cause slow database connects
 
 
SOLUTION
 
 
The potential solutions are:
1)  Apply patch for defect 9593134 at earliest opportunity
2)  ***Add /etc/resolv.conf parameter:
     options timeout:1

跟客户确认后,客户确实上午更改了  /etc/resolv.conf   ,将   dns   域名解析禁用后,连接正常。

此次问题是由于客户禁用dns域名解析导致的连接卡顿


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70013625/viewspace-3092187/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle ACE,MySQL 8.0 OCP,PMP,拥有OceanBase OBCP,TiDB PCTP,GoldenDB GDCP等多项认证,ITPUB认证专家,微信公众号:DBA之友。

注册时间:2022-02-08

  • 博文量
    132
  • 访问量
    171519