Serverside Configuration   «Prev  Next»

Lesson 11 Configuring Network Timeouts in Oracle 23ai
Objective Configure Oracle Net Services timeout parameters to control how long the client or server waits before terminating a stalled connection.

Configuring Network Timeouts in Oracle 23ai

In older Oracle networking documentation, administrators sometimes referred loosely to a “TNS timeout value.” In modern Oracle Net Services, that idea is implemented through a set of named parameters rather than through a single master timeout switch. In Oracle 23ai environments, the practical work is done in the sqlnet.ora profile, with related settings sometimes appearing in listener.ora or in the connect descriptor used by the client.

The objective of this lesson is not merely to edit a file. It is to understand which timeout controls which stage of the connection lifecycle. A client can stall while trying to establish a connection. A user session can hang while waiting for data to arrive. A server process can block while attempting to send data to an unresponsive client. If these conditions are left unchecked, resources remain tied up longer than they should, and troubleshooting becomes harder because sessions appear to freeze instead of failing in a predictable way.

Oracle Net Services uses sqlnet.ora on both clients and database servers. Oracle documents that the file can reside in a location specified by TNS_ADMIN, in ORACLE_BASE_HOME/network/admin, or in ORACLE_HOME/network/admin. The same file family is therefore part of both client-side and server-side Oracle networking behavior. :contentReference[oaicite:3]{index=3}>When you configure timeout values correctly, you gain three benefits. First, you reduce the amount of time the system waits on dead or stalled network activity. Second, you create a cleaner operational boundary between normal latency and abnormal delay. Third, you make Oracle Net errors easier to interpret because the timeout reflects a deliberate policy rather than an uncontrolled operating-system default.

Why Timeout Configuration Matters

Oracle networking does not fail in only one way. Some problems occur before a user ever reaches the database, such as a slow handshake, an overloaded listener path, a firewall interruption, or an address that is reachable only intermittently. Other problems happen after the session is established, such as a stalled read, a blocked send operation, or a client machine that disappears without cleanly closing the socket.

Timeout settings help you define how patient the software should be in each case. Without them, a process may wait far longer than the business or the DBA intends. In a development environment that may be a nuisance. In production, especially where connection pools, batch jobs, shared middleware, or remote application servers are involved, it becomes an operational risk.

Oracle’s ORA-12170 guidance makes this practical point very clear. If the network or system is slow, Oracle recommends increasing parameters such as SQLNET.INBOUND_CONNECT_TIMEOUT, SQLNET.SEND_TIMEOUT, or SQLNET.RECV_TIMEOUT. That means these parameters are not abstract tuning switches; they are directly tied to real-world connection establishment and communication failures.


Core Timeout Parameters in sqlnet.ora

Oracle documents several timeout-related parameters in the sqlnet.ora profile. The most important ones for this lesson are the following:

  • SQLNET.INBOUND_CONNECT_TIMEOUT: Limits how long a client has to complete connection establishment and authentication with the database. Oracle describes it as the amount of time clients have to connect with the database and authenticate.
  • SQLNET.OUTBOUND_CONNECT_TIMEOUT — Limits how long the client has to establish an Oracle Net connection to the database instance. Oracle notes that this parameter accepts milliseconds, seconds, or minutes.
  • SQLNET.RECV_TIMEOUT — Controls how long a client or server waits to receive data from the peer after the connection is established. This is one of the main protections against stalled reads. Oracle’s parameter reference explicitly defines it as the duration to wait for data from the peer.
  • SQLNET.SEND_TIMEOUT — Controls how long a send operation is allowed to take after the connection is established. This helps protect the system when the peer is reachable but not consuming data normally.
  • SQLNET.EXPIRE_TIME — Verifies periodically that client and server connections are still alive. Oracle documents this in minutes. It is related to dead connection detection and is useful when sessions appear to linger after a network break.
  • TCP.CONNECT_TIMEOUT — A lower-level TCP connection timeout that can complement Oracle Net settings when the issue is at the transport establishment stage rather than the higher Oracle Net dialogue.

Together, these parameters let you separate three different concerns: handshake timeout, communication timeout, and dead-connection detection. That distinction is central to administering Oracle Net cleanly. A common mistake is to change only one parameter and assume it covers the entire lifecycle of a connection. It does not.

Important Distinction: sqlnet.ora Versus Connect String Timeouts

Modern Oracle networking also supports timeout settings in the connection string itself. Oracle documents a CONNECT_TIMEOUT parameter for a listener address, and Oracle’s ORA-12170 guidance states that connection-string parameters can have higher precedence than the corresponding sqlnet.ora settings. That means a DBA must think in layers:

  1. Client connect descriptor or Easy Connect string may define the initial connection timeout.
  2. Client-side sqlnet.ora may define outbound, send, and receive behavior.
  3. Server-side sqlnet.ora may define inbound authentication and communication limits.
  4. listener.ora may add listener-specific protections for inbound connection handling.

This layered model explains why two systems can appear to have “the same Oracle Net configuration” while timing out differently. One may be using a descriptor-level timeout that overrides the profile. Another may be relying entirely on sqlnet.ora. For a production DBA, documenting where the timeout policy lives is as important as choosing the numeric value.

Where to Configure the Parameters

On the database server, timeout settings are typically managed in the server-side sqlnet.ora. On a client workstation, application host, or middleware node, corresponding values can be set in that client’s Oracle networking profile. Oracle’s documentation states that Oracle Net searches for sqlnet.ora first in the directory pointed to by TNS_ADMIN, then in ORACLE_BASE_HOME/network/admin, and then in ORACLE_HOME/network/admin. :contentReference[oaicite:19]{index=19}>This search order matters in real environments. A DBA may edit one copy of the file while the software is actually reading another. When timeouts appear to have no effect, the first thing to confirm is that the correct profile file is being loaded.


Procedure: Configure Oracle Net Timeout Parameters

  1. Identify the scope of the timeout problem.

    Determine whether the issue is a slow inbound login, a slow outbound client connection, a stalled receive operation, or a stalled send operation. Do not choose values blindly. Match the parameter to the failure mode.

  2. Locate the active sqlnet.ora file.

    Check the TNS_ADMIN setting first. If it is not defined, inspect the standard Oracle Net administrative directories. In read-only Oracle home deployments, Oracle documents ORACLE_BASE_HOME/network/admin as the default location. :contentReference[oaicite:21]{index=21}/li>

  3. Edit the timeout parameters.

    The following example shows a balanced starting point for a typical environment. The values are examples, not universal standards:

    # sqlnet.ora
    # Dead connection detection
    SQLNET.EXPIRE_TIME = 10
    
    # Inbound handshake and authentication timeout
    SQLNET.INBOUND_CONNECT_TIMEOUT = 60
    
    # Outbound client connection timeout
    SQLNET.OUTBOUND_CONNECT_TIMEOUT = 30
    
    # Communication timeouts after connection establishment
    SQLNET.RECV_TIMEOUT = 120
    SQLNET.SEND_TIMEOUT = 120
    
    # Lower-level TCP connect protection
    TCP.CONNECT_TIMEOUT = 40
    
  4. Consider complementary listener protection.

    If you are protecting the listener path itself, also review listener-side timeout controls in listener.ora. This creates a layered defense against slow or incomplete inbound connection attempts.

  5. Apply the configuration carefully.

    Client-side changes typically affect new client connections. Server-side changes may require listener or service-related operational steps depending on how your environment is managed. In practice, DBAs commonly reload or restart the listener when they want deterministic pickup of inbound listener-related changes.

  6. Test with controlled failure scenarios.

    Validate the result by simulating slow network establishment, incomplete authentication, or a stalled read/write path. Then confirm that the observed timeout aligns with the policy you intended to enforce.

How to Think About Each Timeout in Practice

Use inbound timeout to protect the database from incomplete logins. This is useful when clients are connecting through unreliable paths, when security scanning tools create half-open connection attempts, or when denial-of-service style behavior is a concern.

Use outbound timeout to keep clients from hanging too long during connection establishment. This matters on application servers, batch hosts, and desktop clients where the user or application needs a prompt failure rather than a long pause.

Use receive timeout when the session is established but no data is arriving. This often helps in scenarios where the remote side is present but not responding normally.

Use send timeout when the database or client cannot complete a send operation. This matters when the peer is reachable enough to keep the socket open but not healthy enough to drain the data stream.

Use expire time to identify dead sessions that otherwise linger. This is especially valuable when network devices or operating systems delay the detection of broken connections.

Troubleshooting and ORA-12170

Oracle’s ORA-12170 documentation is useful because it ties timeout configuration directly to diagnosis. If the failure is due to a slow network or system, Oracle advises increasing one or more of the relevant timeout parameters. If the issue appears malicious, Oracle advises identifying the source and restricting access. Oracle also notes that if the timeout is defined in an Easy Connect string or tnsnames.ora connect descriptor, those settings may take precedence over the corresponding sqlnet.ora values. :contentReference[oaicite:23]{index=23}>For the DBA, the lesson is straightforward: when a timeout error appears, do not only ask, “What value should I set?” Also ask, “Which layer enforced the timeout?” That question often determines whether the corrective action belongs in the client descriptor, the client profile, the server profile, or the listener configuration.


Best Practices

  • Start with moderate values and tune from observed behavior rather than choosing aggressive numbers immediately.
  • Document whether the effective timeout policy lives in sqlnet.ora, the connect descriptor, or both.
  • Keep client-side and server-side expectations aligned so applications do not fail earlier than DBAs expect, or wait longer than operators can tolerate.
  • Use SQLNET.EXPIRE_TIME for dead-connection hygiene, but do not confuse it with handshake or send/receive timeout behavior.
  • Test in a non-production environment before rolling the change into shared application infrastructure.
  • When investigating ORA-12170, review both slow-network causes and possible hostile or malformed connection behavior. :contentReference[oaicite:25]{index=25}ul>

Configuring Oracle Net timeout parameters in Oracle 23ai is really an exercise in connection-state management. You are defining how long Oracle should wait during connection establishment, how long it should tolerate stalled communication, and how it should detect sessions that are no longer alive. Once that logic is clear, the individual parameters in sqlnet.ora become easier to choose and explain.

The key takeaway is that there is no single magical “TNS TIMEOUT” setting in modern Oracle Net. Instead, Oracle gives you a set of focused controls: inbound, outbound, send, receive, and connection liveness. Used together, they let you convert vague hanging behavior into a deliberate, supportable operational policy.


SEMrush Software 11 SEMrush Banner 11