EclipseLink timeout on idle connections

Hi,
I'm using EclipseLink 2.1.0 + MySql for a web application. Internal connection pool is used instead of Tomcat maintained pool.
The issue I'm currently facing is that connections in the pool become idle during the night (when the application is indeed idle).
In the morning the first attempt to use a connection fails, but further attempts work fine.
I've heard that H3C0 (Hibernate) and other connection pools support a feature that sends a sort of heartbeat packet to
keep the connection alive so that every connection in the pool does not timeout (e.g. using the testConnectionOnCheckout
property).
Is it possible to get the same behaviour on EclipseLink in order to avoid that an idle connection times out ?
Matteo

It turned out that the feature I was looking for is not implemented in EclipseLink 2.1.0.
In order to fix my problem I had to change the configuration of EclipseLink to use the Tomcat connection pool (dbcp). This provides the following useful parameters:
     testWhileIdle="true"
     validationQuery="select count(*) from dual"
     minEvictableIdleTimeMillis="2880000"
Basically this checks every 8h idle connections performing the validation query, thus avoiding timeout. Simple and good!

Similar Messages

  • Difference between Idle Connection Time and HTTP Keepalive Duration?

    What is the difference between the Idle Connection Timeout and the HTTP Keepalive Duration configuration parameters? I thought that setting one or both of these values would cause the webLogic web server to terminate client requests that result in processes that run much longer then the time value set in these parameters.

    Both of these settings are protection against denial of service at the protocol level, Brian.
    <b>Idle Connection Timeout</b> is a generic timeout for idle connections, whereas <b>HTTP Keepalive Duration</b> is specifically for HTTP keepalive connections. (which doesn't cover T3, IIOP or jCOM)
    Both of those configuration options are related to freeing up resources like sockets and server-side objects in memory from idle clients.
    There's actually no way of stopping long-running processing on the server triggered by a client request that I'm aware of - there are ways you can alert system administrators that something is wrong however.
    The best bet there is defining a value for <b>Stuck Thread Max Time</b>, and also for <b>Stuck Thread Timer Interval</b>. That won't stop processing on the server, but it will cause a log message that can be sent on to a monitoring console like Openview.
    Beyond that, it's really an issue for application development. There are ways that you can put the brakes on, like ensuring that poentially long-running operations run under a transactional context, and setting a reasonable transaction timeout value. Also, checking for rollback-only settings inside EJB code.
    I could be wrong, but I'm pretty sure there's no easy answer here.
    Does that help at all, Brian?
    <br>
    Kevin Powe
    http://www.integral-techsolutions.com

  • ASA TCP Idle Connection Timeout Suspense

    Hello I upgraded our Cisco ASA 5520 with a Cisco ASA 5585. Though both ASA were configured with default TCP Idle Connection Timeout values people are now starting to complaint that idle SSH connections are being terminated. This is proper behavior but they were claiming it didn't occur with the old firewall. Our users are setting keepalives for 1800 seconds to get around this before I can bump the setting to infinite (setting 0). Is there a bug with the feature in older ASA OS?

    Hi,
    Before looking for a bug I would check the ASA logs (hopefully you are storing them to a separate Syslog server) and see why the connections are torn down (Teardown reason) and how long have they been on the ASAs connection table before they were torn down.
    You also have the option to perform traffic capture on the ASA for the traffic in question and confirm why or which party terminates the connection.
    I guess you can use the MPF on the ASA to configure separate idle timeouts for just these SSH Connections if you do not want to touch the global timeout values.
    I have not run into any problems with the timeout settings on the older softwares. In the newer softwares (8.3+) I have run into these problems. In those situation the ASA has not removed the connection that have reached the timeout value. I have seen connection that have been idle for over 1000h.
    - Jouni

  • ASA-5585-X 8.4(6)5 Idle connections are not being removed according to timeout settings

    Hi,
    Just a quick question if anybody has run into a bug where the ASAs "timeout" settings are not being applied to idle connections.
    It seems that our ASA running the software level 8.4(6)5 is not tearing down connections. This mainly seems to be a problem in one Security Context where there are around 300k UDP connections (related to VOIP phones) that are not being torn down. Idle timers on the connections are going as far as 700 hours. Common to all the UDP connections is also the fact that only 19 Bytes of data has been transmitted on the connection built on the firewall. I am not sure what the purpose of these UDP Connections is as both the source and destination port is a random high port.
    I was not able find any Bug ID which description would match the situation I am seeing. I did not see anything in the release notes of 8.4(7) or its interrim release either that would list thing kind of bug.
    - Jouni

    Hi Jouni,
    This caveat seems to be the closest match as 8.4.6 is the affected ASA code.
    CSCuh13899
    Symptoms:-
    Some connection may not removed even after reaching idle timeout.
    https://tools.cisco.com/bugsearch/bug/CSCuh13899/?reffering_site=dumpcr
    You can upgrade to the next stable ASA code as suggested in the referred document.
    HTH
    Regards,
    Dinesh Moudgil
    P.S. Please rate helpful posts.

  • DPS 6 idle connection timeout?

    Ok I must be blind... where is the idle connection timeout setting for DPS 6? I would assume in the connection handler. Migrating from v5 and in the old version its in the network group.

    Is this what you're looking for?
    $ dpconf help-properties | grep -i idle
    ldap-data-source monitoring-inactivity-timeout rwd 1s <= DURATION | unlimited Maximum time the availability monitor detects no activity before performing a search on the idle connection to keep it alive. (Default: 2m)
    ldap-listener connection-idle-timeout rwd DURATION | unlimited Maximum time a client connection can remain idle before being closed (Default: 1h)
    ldaps-listener connection-idle-timeout rwd DURATION | unlimited Maximum time a client connection can remain idle before being closed (Default: 1h)

  • Avoiding the idle connection timeout?

    Our DBAs have implemented an idle connection timeout.
    Is there an option in SQL-Developer to keep the connection alive by having it periodically send "dummy" commands to keep the connection alive?

    Hi,
    Even though there is no listing for it on the Third Party Extensions Exchange on the SQL Developer Community page here,
    http://www.oracle.com/technetwork/developer-tools/sql-developer/community/index.html
    a "Keep-Alive" extension exists and you may wish to try it. Here is the post for it on this forum:
    SQL Developer Keep-Alive Extension Created!
    If you don't wish to install an extension, an alternative is here:
    How to reconnect without using the "keep alive" plug-in?
    Regards,
    Gary
    SQL Developer Team

  • Tcp-flow-timeout on outgoing connections

    Hello,
    We have clients connecting to a server, through a CSS.
    The server, on some specific cases, has to connect to the clients (different port).
    Since IP adresses are the same, the connection has to go through the CSS, which in this case is acting as gateway.
    We're facing issues, because of teared down flows at CSS level ; we'd like to change the inactivity timeout, but can't find an easy way.
    So far, the only thing I found, is to set a permanent port, but it's not really the best solution, as connections which were not closed correctly would accumulate in the system.
    Would there be an easy way (I'd prefer to avoid having to create contents) for the outgoing flows, on a specific port, to have a different inactivity timeout than the default one ?
    Thanks in advance for your help.
    Cheers
    Mael

    Hi Mael,
    CSS will not break routed connections just going through it.
    Here's what happens:
    1) CSS gets a packet directed towards an IP which is not configured as VS. When it does, it creates a connection for that flow even if the  packet is not the original SYN of the three way handshake.
    2) If no data is received on this connection for 16 seconds, it is moved to the free-flows list. Once it is there, the CSS will continue to  use the information located in it to forward traffic but the connection will be removed as soon as we need some room for new entries.
    3) Once the connection is removed even from the free-flows list and that we get a new packet for the connection, you got back to point #1.  Since the CSS doesn't check for stateful information (AKA doesn't check if the first packet is a SYN).
    So even if the idle timeout of the connections going through it are 16 seconds, a routed TCP flow through the CSS *will never  time out*.
    For changing inctivity timeouts for loabbalanced connnections you can use the below command which needs to be applied to Content rule/source groups.
    flow-timeout multiplier
    Note: If you give number as 2, CSS will multiply it by 16 and actual timeout would be 32.
    The permanent option is also good one but can be a problem if you have high traffic for that port. You can also use cmd-scheduler along with permanent port to clear the flows periodically.
    Regards,
    Kanwal

  • Error occuring during manual login after idle connection time out

    Hi,
    I am using a PowerBuilder (v11.1) application to access Crystal Reports (BOXI Enterprise v 3.1) using Opendocument. The app server is Apache Tomcat. We have implemented SSO using Vintela and at present we have set idle connection time out to 1 hr. The problem I am facing is listed below:
    The SSO Authentication works fine for accessing these reports. But when we try to run crystal reports after not using it for more than 2 hours system prompts us for login. I understand that we are getting login prompt because connection was idle for more than 1 hour but when we manually enter our login credentials it gives us an error 'An error has occured. An error occured while trying to view the document'.
    However after getting the above error if we again try to run the report, it works fine.
    Please can anyone provide us with some insight as to why this behaviour could be occurring. Any help would be much appreciated.

    ->in application connection time out is set to zero
    Are you sure? There are two different can timeouts you can experience: connection timeouts and command timeouts. The link posted by Praveen is about command timeouts. The default for the connection timeout is 15 seconds and the command timeout is 30 seconds.
    It is very reasonable to set the command timeout to 0, which means that wait forever. Waiting forever is less reasonable for the connection timeout. But when I think of it, I am not sure that 0 means "forever" for the connection timeout. So if you
    have set it to zero, maybe that is your problem.
    Else, I would suspect a network problem.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Set timeout for URL connection in java1.4

    hi
    I want to set timeout for URL connection in java 1.4..
    java 5.0 provides with a setTimeout(int ) method but how should it be done in 1.4 environment
    Thanks in advance
    sneha

    sun.net.client.defaultConnectTimeout (default: -1)
    sun.net.client.defaultReadTimeout (default: -1)
    See the [Networking Properties|http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html].

  • Huge number of idle connections from loopback ip on oracle RAC node

    Hi,
    We have a 2node 11gR2(11.2.0.3) oracle RAC node. We are seeing huge number of idle connection(more than 5000 in each node) on both the nodes and increasing day by day. All the idle connections are from VIP and loopback address(127.0.0.1.47971 )
    netstat -an |grep -i idle|more
    127.0.0.1.47971 Idle
    any insight will be helpful.
    The server is suffering memory issues occasionally (once in a month).
    ORA-27300: OS system dependent operation:fork failed with status: 11
    ORA-27301: OS failure message: Resource temporarily unavailable
    Thanks

    user12959884 wrote:
    Hi,
    We have a 2node 11gR2(11.2.0.3) oracle RAC node. We are seeing huge number of idle connection(more than 5000 in each node) on both the nodes and increasing day by day. All the idle connections are from VIP and loopback address(127.0.0.1.47971 )
    netstat -an |grep -i idle|more
    127.0.0.1.47971 Idle
    any insight will be helpful.
    The server is suffering memory issues occasionally (once in a month).
    ORA-27300: OS system dependent operation:fork failed with status: 11
    ORA-27301: OS failure message: Resource temporarily unavailable
    Thankswe can not control what occurs on your DB Server.
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ
    post results from following SQL
    SELECT * FROM V$VERSION;

  • Informatica 7.1.4:  IDLE Connections Killed

    So I posted this question on Informatica's forum "Communities" but I wanted to post it here as well.
    We're on Informatica 7.1.4 (yeah, I know its old, but we're about to upgrade) and we have been running into issues where one long running ETL fails because the Oracle 11gR1 DB terminated it's IDLE connection. From what I can understand, here's what happens.
    1. We have a max concurrency rate of 10. So suppose 9 other ETLs are running along with our 1 long running ETL (1hr25minutes is the average time for this one).
    2. All the 10 ETLs create DB connections for the Writer thread at the kick off of the ETL
    3. The long running ETL takes an hour before it even gets to the point where it can start writing to the target. So basically it's connection has been IDLE the entire 1 hour.
    4. On the DB side of things, the DBAs have a cleanup script to remove IDLE sessions that haven't done anything in 1+ hours. So their script kills the connection that the Writer thread is about to use.
    5. Our long running ETL finally finishes sourcing and processing the data and it is ready to insert, but now it fails because the connection has been terminated by the DB.
    I know the easy out is to have the DBAs not kill connections made by Informatica, but I was hoping there would be a more elegant solution.
    Is there a way to have Informatica revalidate it's connection prior to writing? Something like, if connection doesn't exist, re-create, else write? It seems like this should be a server level setting.
    Or is there a way to have Informatica send some kind of heartbeat to the Oracle DB to keep the connection alive?
    Right now we're definitely having the DBAs avoid killing connections created by Informatica. But for the long term, we would like to see Informatica be more intelligent about the health of the connection its using.
    Thanks for the advice.
    -Joe

    Are both of the Informatica Servers on the same machine?
    If so, one thing you can try is when connecting to the Remote Server from Windows is setting the IP Addresses to 127.0.0.1 or using the name localhost for the Informatica Server (In the Server Editor screen of the Workflow Manager). You only need to set the valid IP Address for the Repository Server to get the Repository Admin tool to connect. Once that connection is made the Informatica Server uses that information to start itself.
    I used an approach like this to stand up both Informatica Servers on Oracle Enterprise Linux.

  • Cisco 7921 Wireless DCHP Timeout after loosing connection

    Running 7921
    AP 1200 Software Version 12.3(4)JA
    I'm having a problem that after I set the phone up. Everything comes up fine and works great but whenever I hit a deadzone or if it looses connection, the phone will try to configure the IP and then it gives me a DHCP timeout and never connects again. If I reset my TFTP settings it then works again. How can I prevent this?

    Yes per my 7921G Deployment Guide @ http://www.cisco.com/en/US/docs/voice_ip_comm/cuipph/7921g/6_0/english/deployment/guide/7921dply.pdf, you need 12.3(8)JEA or later to run the 7921G phone successfully.
    12.3(8)JEC is ok for the 1230, but would suggest 12.4(3g)JA1 or later for the 1240.
    For static WEP, need to ensure the keys on the AP and the client match. If you have 2 keys where one is tx on key 1 and the other is on key 2, then the other side needs to have the same key to be able to decrypt the packets.

  • SRP541W drops idle connections fast

    I have installed SRP541W and found a big anoying issue with this router - it drops idle TCP connections after a couple of minutes (more than 5 but less than 20) of inactivity. Namely, this "feature" becomes apparent when using ssh connections - if nothing happens in an ssh terminal for a given time, the connection is lost and the ssh client must be reconnected. As having a lot of ssh terminals open simultaneously (and, of course, leaving some them idle for a while) is a core of my work, this behavior annoys me a lot. Does anyone know how to solve this problem?
    I understand that dropping idle connection is needed to keep the NAT tables reasonably small, but dropping connections after less than 20 minutes of inactivity is just way too fast and useless. Even cheap home routers usually do not drop idle connections after many hours or days of inactivity.

    Also, if I switch the Airport Express to connect to the 2.4GHz network instead, the same thing happens on that network. After a few hours, the base station stops authenticating clients on the 2.4GHz network, and only the 5GHz network works.

  • Is there any way to set read timeout on JDBC connection?

    When the network connectivity between the machine
    where Database is running and where the application is running breaks,
    the query executed using the old connection handle is not timing out.
    Is there any way to set read timeout on JDBC connection. ?
    FYI, Oracle JDBC thin Driver is used in our application.

    Set the tuning parameters with Embedded OC4J Server Preferences>Current Workspace>Data Sources>jdev-connection-DBConnection1 node.
    Select the Tuning tab.
    The Inactivity Timeout parameter specifies the number of secs of inactivity after which a connection gets disconnected.

  • Shorting the timeout for socket connection

    Hi everyone, i've got a client who owns a handle to a remote object. When the remote object quits, accesing it through a method invocation throws a java.net.SocketTimeoutException: Read timed out. That's fair, what's up is that it lasts about six seconds in sending it, and i would like to shorten the time it waits until it realises it can't connect. I've tried with sun.rmi.transport.connectionTimeout and sun.rmi.transport.tcp.readTimeout, and no success. Any idea?
    Thanks in advance.

    The "sun.rmi.transport.proxy.connectTimeout" parameter works only when HTTP is used.
    We do it manually by utilizing RMI client and server socket factories and setting socket options as appropriate. For the connect timeout, there is connect(SocketAddress endpoint, int timeout) method of the Socket class. With this approach, the application has a full control over sockets used by the RMI engine.

Maybe you are looking for

  • New GeoRaptor release !

    Hello List, A new release of the GeoRaptor plugin is ready ! Version 20100524 is available for download on the project's sourceforge page : [http://sourceforge.net/projects/georaptor/] Update center : [Update Center|http://georaptor.sourceforge.net/i

  • Delivey for Multiple Sales orders

    Hi,   I am new to SD and would like to know how do we create a single delivery corresponding to multiple sales orders. Can someone please advice me about the same? Thanks and Regards,    Aditya

  • How do I upload excel in contacts

    I recently downloaded my contacts from Microsoft Outlook into excel format. I would like to upload them to the contacts book on my MacBook Pro. Can anyone help?

  • Extremely slow backup for System 4.2 update

    It's been some time since I've synched my iPad, so I am updating from 3.2.2 to 4.2. When starting the update via iTunes, it seems that the backup process is taking an excessively long time, i.e. greater than 2 hours and not done yet. (I started over

  • Importing images into Xcode

    I am a newbie to XCode 5....but when I try to import my images to the new App Icon Assets, the .jpg file is greyed out in the dialog box. I can add any info needed to help solve the problem. Thank you so much!!!