Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2006
    Posts
    11

    Unanswered: Java Oracle Application and Linux TCP KeepAlive feature

    Here is the scenairo:

    I got two PCs, one is Linux(RH4), which is installed a Java Oracle related application, and the other is Windows(2000), where the Oracle database stayed.

    I want response quickly when the network between those PCs is suddenly down. So i notice that linux have KeepAlive attribute which can solve this.

    I set the following KeepAlive attributes:

    Code:
    net.ipv4.tcp_keepalive_intvl = 5
    net.ipv4.tcp_keepalive_probes = 5
    net.ipv4.tcp_keepalive_time = 10
    and also i add the "ENABLE=BROKEN" property to JDBC driverUrl to enable application to support TCP KeepAlive of OS.

    but the result is not what i expected. The application just hangs and didn't report exception until around 15 mins after i cut the network.

    What's yours idea? is KeepAlive set correctly? or how do i check if the KeepAlive package is sent?

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >What's yours idea?
    This problem has nothing really to do with Oracle.
    >is KeepAlive set correctly?
    This problem has nothing really to do with Oracle.
    ?or how do i check if the KeepAlive package is sent?
    This problem has nothing really to do with Oracle.

    GOOGLE is your friend but only when you use it.
    Results 1 - 10 of about 1,430,000 for KeepAlive Linux.
    Do you claim that none of these has the answer to your questions?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Sep 2006
    Posts
    11
    To anacedent : Of course, i have googled before i posted here. The KeepAlive setting of Linux is none busniess of Oracle, but i think "ENABLE=BROKEN" is a Oracle connecting variable, in some documents said, without "ENABLE=BROKEN" been set, TCP KeepAlive is not activated for Oracle JDBC Connection.


    Maybe i didn't describe my problem clearly, i have a Java Oracle application, and i want if i break the network between application and Oracle database, the connection exception should report as quickly as possible. But in the real world, it is about cost 15 mins. to throw the exception.

    In my mind, I think i have to give some options to Oracle JDBC driver to enable KeepAlive variable of Socket Connection, then set the right setting of OS(Linux) KeepAlive Feature, and i could get the exception as quickly as i want.

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >but i think "ENABLE=BROKEN" is a Oracle connecting variable,
    Sorry, but I disagree.
    Oracle DB does not know or care about the details of any client. It simply processes SQL statements.
    At best you have an issue with ODBC, but again the database could care less if/when the client gets disconnected.
    Remember that ODBC is database neutral & could as easily apply to DB2, SQL Server or any other RDBMS.
    So, explain agin how/why this is related to Oracle RDBMS.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    In order for an application to support keepalive, the application must be WRITTEN to support it. Case it, your application is probably not implemeting it, and thus ignoring it.

    You can see if the keealive prove is being sent with a package sniffer, such as Ethereal.

  6. #6
    Join Date
    Sep 2006
    Posts
    11
    In order for an application to support keepalive, the application must be WRITTEN to support it.
    I know it, that's why i ask for help here. I know the way for application to support keepalive is made Socket keepalive enabled. In C program, i can simple setsockopt() to enable it, in Java application, i can socket.setKeepAlive(true) also, but with JDBC connection, i don't know how to enable it yet. I think it is JDBC driver related.


    You can see if the keealive prove is being sent with a package sniffer, such as Ethereal.
    Thanks, i know this tool before, but i haven't use it, maybe i will give it a try today.


    To anacedent : I know "Oracle DB does not know or care about the details of any client.", but i think Oracle JDBC driver does. Different clients might give different options for JDBC driver to connect Oracle DB. I don't confirm this, but i guess it is.


    Regards
    Black Thought.
    Last edited by 51dunk; 07-13-07 at 03:00.

  7. #7
    Join Date
    Sep 2006
    Posts
    11
    Does anybody trying to set up keepalive feature in linux?
    or Does anybody use "ENABLE=BROKEN" of JDBC connection?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •