How to set TCP connection timeout in solaris 9

Hello All,
I am new to solaris. While using oracle, sometimes I face tcp connection timeout.
The timeout happens after a long delay like more than 8 min. I want to reduce the tcp connection timeout to 2 min in solaris.
Please help me to change this setting.
My current configuration is
SunOS testmachine 5.9 Generic_122300-13 sun4u sparc SUNW,Sun-Fire-V440
Thanks
Purushoth

There's a fair amount of tunables. Without known what is timing out (dns, lost packet...), it's hard to say what you want to tweak. The list of parameters can be seen by using ndd:
ndd /dev/tcp \?
or
ndd /dev/ip \?
and can be set by using ndd -set (see ndd(1M) ). Note that anything you set has to be reset on reboot, so you have to stick this in a script somewhere, or know what the variable translates to to stick it into /etc/system.
-r

Similar Messages

  • How to handle a Connection Timeout

    Hi Everybody,
    My situation is as follows: I have a web application, some sort of content management system. I'm using MySQL to store information. The application is obtaining Connection objects via a Connection Pool. I'm runngin Sun Java Application Server 8 Update 1 and MySQL 4.1.9 on a Windows 2003 Server machine.
    After 8 hours of inactivity, the system it's raising an exception. Searching the log, I've found the cause, an SQL Exception with a "recv failed" error. Google said that MySQL shuts the idle connections after 8 hours, and also found a code to correctly handling that disconnection. The thing is that the Application Server is handling the connection pool to physically connect with the database, I'm not dealing with connection setup. I've tried setting autoReconnect and autoReconnectForPools properties (in the management console) without success.
    Anyone has any idea to correct this?
    Thanks in advance for your time.
    Best regards
    Antonio Varela.

    You could execute a query from time to time, but you can't control which connection is being used. For example, you could be accessing the same connection all the time, and in the end only one functioning connection would remain in the pool.
    As said in another thread,
    The problem (in detail) is how the MySQL JDBC driver operates. The physical connection to the database can fail, but the Connection.isClosed() method will still return false.
    So, there seems to be some problem with the MySQL driver.
    But even in this case, the "connection validation" options should work on the application server, which they just don't. I am inclined to blame this problem on the connection pool implementation.
    The only "solution" I found so far was to set larger connection timeouts on the MySQL server:
    interactive_timeout = 2764800
    wait_timeout = 2764800

  • TCP Connect Timeout

    Does anyone know of a way to increase the TCP connection timeout on Linux (RedHat ES 3.0, 2.4.21-9.0.3.ELsmp). We currently always keep a "dead" server in our imqAddressList for failover. The server has nothing listening on the portmapper port, 7676. When I telnet over regular Internet it takes less than a second to get a connection refused response:
    telnet: Unable to connect to remote host: Connection refusedWhen I telnet to this server over a low bandwidth satellite connection, I get a timeout after 3 minutes:
    [root@client# time telnet server 7676
    Trying X.X.X.X...
    telnet: connect to address X.X.X.X: Connection timed out
    real    3m15.393s
    user    0m0.010s
    sys     0m0.000sWe currently have 3 servers in our imqAddressList and imqReconnectAttempts is set to 0. However, since one of the 3 servers is dead, 1/3 of the time it takes over 3 minutes to get a connection. I'd imagine that the socket connection from IMQ is exhibiting the same behavior as telnet.
    Is there anywhere that I can tweak this timeout?
    Thanks,
    Aaron

    You need to call connect on a socket set to non-blocking mode with fcntl, and then use select with a timeout to limit the amount of time you will wait for the connect to complete. If select returns because you timed out, then close the socket and return an error. If select returns because of an event on the socket, you use getsockopt to determine if the connect succeeded or not.
    See Stevens, Unix Network Programming Vol 1 for details. Comments in the code I'm looking at say page 411.
    Hope this helps.

  • How to set resource connection factory?

    How to set resource connection factory if JMS is upported through JNDI?

    Hi,
    The Simplest Way to Load a Property file (Which is outside of your Application) ..is.
    Just Place the Property file in the Server Classpath...or in the "C:\bea103\user_projects\domains\7001_Domain\lib" folder of your Domain. It means somehow the Property file should be available in the Server Classpath...
    Now Please write the following code in your Application to read the Property file:
    java.util.Properties prop = new java.util.Properties();
    java.io.InputStream stream=this.getClass().getClassLoader().getResourceAsStream(“my.properties”);
    prop.load(stream);
    String hostProperty = p.getProperty(“host.name”);
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com/generalweblogic/   (WebLogic Wonders Are Here)

  • How to set the connection parameters for SQL

    How to set the connection parameters for SQL to access the MS Access database
    Attachments:
    Quick_SQL.vi ‏21 KB
    Doc1.doc ‏45 KB
    db1.mdb ‏112 KB

    Right-click the WINDOWS desktop, choose New->Microsoft Data Link. That will bring up a dialog that allows you to configure and test your database connection. You might connect to the Access database via ODBC or directly via Jet Engine. The Jet Enginge saves you the trouble of creating an ODBC connection on your PC. After you leave the dialog, the "data link" will show up on your desktop as text file. Open it and copy-paste the connection string to your VI.
    This webpage is an excellent resource for connection strings: http://www.able-consulting.com/ADO_Conn.htm
    If your application requires users to change the database connection at runtime, you can also include the dialog via ActiveX (MSDASC.IDataSourceLocator).

  • Help Set Proxy connection timeout

    Hi,
    I'm currently using: mysock.connect(sockaddr, 2000);
    to set socket connection timeout.
    Everything works fine until i set a proxy:
    System.setProperty("socksProxySet", "true");
    System.setProperty("socksProxyHost", "proxy");
    System.setProperty("socksProxyPort", "port");
    Can i also set connection timeout for the proxy?
    Message was edited by:
    Robotto

    Everything works fine until i set a proxy:are you not able to connect to the server? Whats the issue?

  • How to set Internet connection in solaris for DataOne Service in India?

    I am using a P4 system with Inter Board D945GTP and i have a internet connection from BSNL. I wold like to connect internet to Solaris express Developer Edition 2/07
    Help me!
    bye
    P.Sathish Kumar

    In India one need to configure pppoe for connecting BSNL DataONE broadband. So here is a reference quick guide to setup pppoe for BSNL DataONE
    SUNW ppp packages should be already available for you. If you didn't install, you need the following packages. Install them from Solaris CD.
    Packages
    SUNWpppd  - Solaris PPP Device Drivers.
    SUNWpppdr - Solaris PPP configuration files.
    SUNWpppdt - Solaris PPP Tunneling.
    SUNWpppdu - Solaris PPP daemon and utilities.There will be a file myisp.tmpl in /etc/ppp/peers directory. Copy the file to a filename /etc/ppp/peers/bsnl
    ~# cp /etc/ppp/peers/myisp.tmpl /etc/ppp/peers/bsnl
    Note the conventions used here
    USERNAME       - is your BSNL id eg (userid)
    PASSWORD       - provided by bsnl (*****)
    INTERFACENAME  - is your ethernet card name eg (bge0, hme0....) Edit /etc/ppp/peers/bsnl file using an editor. The uncommented section should look like the following:
    Where INTERFACE should be your ethernet interface name and USERNAME is your broadband user name.
    connect "/usr/bin/chat -f /etc/ppp/myisp-chat"  # dial into ISP.<br>
    sppptun
    plugin pppoe.so
    connect "/usr/lib/inet/pppoec INTERFACE"
    user USERNAME           # my account name at my ISP
    remotename bsnl # name of the ISP; for pap-secrets
    noauth                  # do not authenticate the ISP's identity (client)
    noipdefault             # assume no IP address; get it from ISP
    defaultroute            # install default route; ISP is Internet gateway
    updetach                # log errors and CONNECT string to invoker
    noccp                   # ISP doesn't support free compressionNow there are two configuration files that needs to be updated.
    /etc/ppp/pap-secrets
    /etc/ppp/chap-secretsIn these two files add the entry as follows
    USERNAME        bsnl    PASSWORDWhere USERNAME is your broadband username and PASSWORD is you broadband password. Your configuration is almost completed. Now for connecting:
    #/usr/sbin/sppptun plumb pppoe INTERFACENAME
    #/usr/sbin/sppptun plumb pppoed INTERFACENAME
    #/usr/bin/pppd debug call bsnlYou need to specify dns server to resolve dns names. Create a file in /etc with name /etc/resolv.conf and copy the nameserver info. For example:
    echo nameserver  61.1.96.71 > /etc/resolv.confNote: The IP specified here is BSNL nameserver. Please ask your BSNL operator for exact dns address. Or else you can use the opendns.com server IP.
    cp /etc/nsswitch.dns /etc/nsswitch.conf Make a backup copy so that you can copy back when needed.
    cp /etc/resolv.conf /etc/resolv.conf.bsnlIn case you are still not able to resolv dns name, check if dns/client service is running or not.
    svcs -a | grep dns/clientIf not enable
    svcadm enable dns/clientIf not online, try starting
    svcadm restart dns/client
    or
    svcadm refresh dns/clientHere is a simple script that can help you for connecting after configuring PPPoE.
    #!/usr/bin/bash
    ifconfig bge0 plumb
    pkill -9 pppd
    /usr/sbin/sppptun plumb pppoe bge0
    /usr/sbin/sppptun plumb pppoed bge0
    sleep 5
    /usr/bin/pppd debug call bsnl
    echo nameserver 208.67.222.222 > /etc/resolv.conf
    echo nameserver 208.67.220.220 >> /etc/resolv.conf
    echo nameserver  61.1.96.71 >> /etc/resolv.conf
    cp /etc/nsswitch.dns /etc/nsswitch.conf
    svcadm restart dns/clientRegards
    Britto

  • Setting TCP Read timeout value?

    How do I choose a timeout value for a TCP read function?
    I'm receiving data from a server at a rate which varies between 40 and 140 Hz (normally 120 Hz), there is no handshaking and at any set transmission rate it appears that the network load causes the rate to fluctuate slightly.
    All I have been able to do so far is plot a frame number that is received in my data and fiddle with the buffer mode and timeout until I get the least dropouts. At 120Hz 5ms works best with a standard buffer, surprisingly 8ms is poorer.
    I am using a producer consumer loop with a queue and some interpolation to make up for the loss of data. 
    This is very hit and miss so I'm sure there's a proper / better way to do this!

    If you are using standard mode, then the read function should return any partial data, but will report an error out.
    You may want to look at the functions that you call after the TCP read. I think that the enqueue function will NOT enqueue data if there is an error in.
    There is a function you can use to clear TCP timeout errors. You could use this to allow you to enqueue partial data to your consumer loop.
    vi.lib\addons\internet\utils\tcputil.llb\No Time Out Error.vi
    Note that it will be up to your consumer code to identify your 'frames' for proper decoding.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • ACE TCP connection timeout

    Hello,
    our customer has a problem with correct closing TCP connections on the ACE. TCP session (HTTP protocol) is closed _correctly_ (we can see it in the sniffer output), but 'sh conn' on the ACE shows it as 'established' (session is already closed). TCP timeout is set to default (60min).
    Any new connection from the same src port (because many connection to the service) is closed after TCP session is established.
    When I try generate 200 concurrent sessions TCP sessions in my lab, this are on the ACE closed correctly. Customer's traffic is around 20-30.000 concurrent session, but I can't generate so much traffic.
    SW version on the ACE: 3.0(0)A1(3b)
    thx
    martin

    Thanks Gilles!
    The problem occurs only with traffic from WAP nodes (too many short HTTP requests).
    We try it upgrade to A1(5b), but I'm not sure, if this is our problem...
    Bug description:
    Symptom:
    With L7 LB configuration, Some times connections do not close.
    Conditions:
    SYN sent to Real server may result in ACK coming from server. ACE TCP module was not handling this ACK correctly.
    ...but our traffic is only L4 LB and we have a problem with connection state on the ACE from both sides (client and server). on the client and server side is connection closed properly, but on the ACE module ('sh conn') we can see it in 'established' state. It's closed after TCP timeout and that is not correct.
    martin

  • Set URL connection timeout

    How do I adjust the timeout for connection to a URL?
    The timeout BEFORE Firefox reports 'not found'

    There is no setting in Firefox for that. You need to change a tcpip parameter in the Registry.
    http://drewthaler.blogspot.com/2005/09/changing-dns-query-timeout-in-windows.html
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DNSQueryTimeouts
    Multi String: "1 2 2 4 8 0" -> "4 8 8 16 32 0"

  • RMI - How to set a client timeout?

    Hey folks,
    please don't crucify me, but i googled for "rmi client timeout" and i only found confusing and / or really dated information.
    Could somebody enlighten me on how to set a timeout for an RMI-client?
    Even an RTFM would be fine, but which?

    Hi,
    thanks for your insistence.....:-)
    ejp wrote:
    1. Are you using rmic? UnicastRemoteObject? or some JBoss API?Ehm, for the client?
    The client's sourcecode for connecting to the Jboss-Server / my EJB-application is:
    Hashtable<String, String> props = new Hashtable<String, String>();
    props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
    props.put(Context.PROVIDER_URL,"jnp://" + "myhost");
    props.put(Context.SECURITY_PRINCIPAL, "myuser");
    props.put(Context.SECURITY_CREDENTIALS, "mypassword");
    Context ctx = new InitialContext(props);
    // get RMI stub
    ISendCommand sendCommand = (ISendCommand) ctx.lookup(myjndiname);
    String result = sendCommand.sendCommand(myArgs);So i think this corrensponds to "UnicastRemoteObject" from your enumeration?
    ejp wrote:
    2. How do you know JBoss terminates the connection?Because i have a timeout configured in my EJB-application, but in the example i try to get working, the client shall use its own timeout which is before the EJB-timeout.
    The EJB-timeout works, but not the client timeout.....(as described above)
    ejp wrote:
    3. What happens at the client? An exception? Nothing?"Nothing", i.e. the client terminates when the connection times out (from the JBoss / EJB-side!)
    ejp wrote:
    4. Are you ignoring any exceptions at the client?No.
    Shouldn't this client timeout be totally independent from any server / Jboss / whatever stuff?
    Any more ideas?

  • How to set VPN Connection in Windows 7 64bit?

    Hi
    How can I set up a Vpn in connection in Windows 7 x64 bit.
    Thanks.

    Hi,
    Go to Control panel-Network and Internet-Network sharing Center.
    http://www.windows7hacker.com/index.php/2009/08/how-to-set-up-a-vpn-connection-in-windows-7/
    Note, you should know the login and password to have the Internet access :)

  • How to set the keepalive timeout and nativepoll in application server 8.2

    Hi,
    I would like to know how to set "keepalive timeout" and "nativepoll" on application server 8.2.
    Thanks,

    These parameters were set in Application server 7 as per the following documentation:
    http://docs.sun.com/source/817-2180-10/pt_chap4.html
    However I am not able to find any documentation with regards to application server 8.2
    Please advice..
    Thanks

  • Tcp Connection timeout on ASA for vpn traffic

    Hello All
    I need an answer please.
    I wanted to give tcp conenction timeout as unlimited for some IPs coming through VPN.
    So, I created an access-list defining the traffic for which I want this tcp timeout.
    Then a class map, policy map, entered set timeout to '0'
    Applied it under default service-policy, which is applied as global (by default).
    My doubt is should I apply the service policy on the interface or the global will work.
    Just a silly doubt
    Thanks in advance.

    Hi,
    I think it should work just fine if you attach it to the default "policy-map" configuration that you have attached globally on the ASA.
    You might want to configure the timeout value as something long rather than setting it as unlimited.
    - Jouni

  • Set URL connection timeout Windows 7

    How do I adjust the timeout for connection to a URL?
    The timeout BEFORE Firefox reports 'not found'
    I found only a Tutorial for Windows XP:
    http://drewthaler.blogspot.ro/2005/09/changing-dns-query-timeout-in-windows.html

    # In the [[Location bar autocomplete|Location bar]], type '''about:config''' and press '''Enter'''. The about:config "''This might void your warranty!''" warning page may appear.
    # Click '''I'll be careful, I promise!''', to continue to the about:config page.
    # Modify "network.http.keep-alive.timeout" parameter (the default value is 115)
    # Restart Firefox.

Maybe you are looking for