How to determine the connection time?

Hello!
We have big troubles with our ConnectionPool. We have adapted most parts from the Book "Professional Java Server Programming" (Wrox Press).
However, the connections are invalid (I/O Exceptions like "End of TNS Data Channel" or "Broken Pipe") after a while.
The average up-time of our pool is approximately 24 hours.
Now we want to drop renew the connections after a certain amount of time (let�s say 1 hour). To do this, we would need to determine the time when the connection has been established. How can this be done?
I have looked into the DatabaseMetaData class, but did not find anything (at the first glance).
PLEASE help me / us, the problem is really severe!
Thanks in advance,
Gregor Graf

PLEASE help me / us, the problem is really severe!Where did you get the pool from? Is it your code? If so then are you sending a keep alive query - which would keep the connection active?
If it isn't your code then are you explicitly returning the connections to the pool?
Commercial pools don't typically drop connections. Some do which can be discovered by examining the configuration options for the pool that you have.
If it is your code and you just want to add this, then you add a time value to each connection node. Each time a node is returned you set the time. You have a thread that runs and checks the time value, dropping any that are older than the value you want.

Similar Messages

  • How to determine the latency time?

    Hi
    How do I determine the latency time?
    I need to connect 3 CAN nodes onto the CAN bus and need to know how to determine the delay(latency) time needed between the transmission of a message from one node and reception at the other,
    The latency time and Bandwidth both play a role in the transmission, right?
    Thanks
    Ekta

    Hi Ekta,
    The software you need if you are using an NI board is NI-CAN, and you can look at the driver download page for the appropriate version for your operating system. I'll suggest you take a look at the example programs that install with that driver to get you started. If you are developing using LabVIEW or LabWindows/CVI, go to Help>>Find Examples>>Hardware Input and Output>>CAN for examples. If you are using Visual Basic or C, go to ...\National Instruments\NI-CAN for examples. I have also attached a LabVIEW example below that shows how to enable self reception.
    If you are using another vendor's CAN board, you will need to install their driver, and see if they have any examples to get you started. I assume the approach for measuring the latency will be similar to what I suggested. Hope this helps. Goodluck!
    Regards,
    Message Edited by _Belle on 04-28-2006 07:42 AM
    Ebele O.
    National Instruments
    Attachments:
    Self_Reception.vi ‏97 KB

  • How to determine the connection string to a SQLite database, in C# code

    Hello. I'm trying to figure out how to specify the connection string to a SQLite database, I would like to access using the following code:
    string connectionString = null;
    SqlConnection connection;
    SqlCommand command;
    SqlDataAdapter adapter = new SqlDataAdapter();
    DataSet ds1 = new DataSet();
    string sql = "SELECT DataName, Data, Id, UserId, DateLastUpdated FROM MainTable";
    connectionString = "Data Source=C:\\SQLITEDATABASES\\SQLITEDB1.sqlite;Version=3;";
    connection = new SqlConnection(connectionString);
    try
    connection.Open();
    command = new SqlCommand(sql, connection);
    catch
    The value I assigned to the variable connectionString, in the code above, I obtained somewhere from the Internet. It does not work. I'm using Visual Studio 2013, against the file sqlite-netFx451-setup-bundle-x86-2013-1.0.96.0.exe, which
    I installed, and got from
    here.
    My application's App.config file looks as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <configSections>
    </configSections>
    <connectionStrings>
    <add name="DC_Password_Saver.Properties.Settings.DC_Password_SaverConnectionString" connectionString="data source=&quot;C:\Users\patmo_000\Documents\Visual Studio 2013\Projects\DC Password Saver\DC Password Saver\DC Password Saver.db&quot;" providerName="System.Data.SQLite.EF6"/>
    </connectionStrings>
    <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>
    </startup>
    </configuration>
    I tried to use the value assigned to connectionString in the XML settings above, replacing single backslash characters with double backslash characters, because the Visual Studio editor flagged them as unrecognizable, and wound up with the
    following.
    SqlDataAdapter adapter = new SqlDataAdapter();
    DataSet ds1 = new DataSet();
    string sql = "SELECT DataName, Data, Id, UserId, DateLastUpdated FROM MainTable";
    connectionString = "data source=&quot;C:\\Users\\patmo_000\\Documents\\Visual Studio 2013\\Projects\\DC Password Saver\\DC Password Saver\\DC Password Saver.db&quot;";
    connection = new SqlConnection(connectionString);
    The above code however does not work either. So again, does anyone know how I can specify in C# code, a connection string to access my SQLite database? Thanks in advance for your reply.

    What does SQLite connection strings has to do with WPF?
    You will find some valid connection strings here:
    https://www.connectionstrings.com/sqlite/
    But you cannot use the SqlConnection class to connect to a SQLite database. You will need to download and add a reference to the System.Data.SQLite library and then use the SQLiteConnection class:
    connection = new System.Data.SQLite.SQLiteConnection(connectionString);
    try
    connection.Open();
    command = new System.Data.SQLite.SQLiteCommand(sql, connection);
    catch
    Please refer to the following article for more information and an example of how to connect and read and write data from an SQLite database using C#:
    http://blog.tigrangasparian.com/2012/02/09/getting-started-with-sqlite-in-c-part-one/.
    There is contains a link where you can download the required assemblies.
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread in an approproate forum if you have a new question.

  • How to determine the last time  a database was used

    Is it possible in to determine the time a CRUD operation occurred on a database?

    How can I activate the auditing? http://download-east.oracle.com/docs/cd/B19306_01/network.102/b14266/auditing.htm#i1011984
    Daljit Singh

  • How do I determine the # of times a song has been down loaded; 7 is max?

    How do I determine the # of times a song has been down loaded? Is 7 max?

    Jim, I apprecite your help. Im still  lost...not that efficient on computer. Some notes, If burn playlist to disc doesn appear in the menu, it means that the playlist you selected cant be burned to a CD because it contains items that have usage restrictions;  if the playist contains itunes store purchases that are not itune plus songs, you can burn the playlsit to a CD up to 7 times;  DRM - Digital Rights Management????  Any help is appreciated Thank You

  • How does OS X determine the idle time to enter sleep mode?

    Is it based on no keyboard/mouse activity? Or based on CPU load level? For example, if I run a long program, will the computer go into sleep mode if I don't use the keyboard and mouse?

    Thanks. Maybe I did not clearly state my question.
    I understand that sleep mode is determined by a set time interval and it can be independtly set for computer and display. My question is regarding the method for determining the set time interval.
    Does the set time interval start when I don't use the keyboard/mouse? If I run some applications and provide CPU load to the system, does it still go into sleep mode after the set time interval and stop the applications if I don't use keyboard/mouse?
    Thanks.

  • How to get the execution time of a Discoverer Report from qpp_stats table

    Hello
    by reading some threads on this forum I became aware of the information stored in eul5_qpp_stats table. I would like to know if I can use this table to determine the execution time of a worksheet. In particular it looks like the field qs_act_elap_time stores the actual elapsed time of each execution of specific worksheet: am I correct? If so, how is this value computed? What's the unit of measure? I assume it's seconds, but then I've seen that sometimes I get numbers with decimals.
    For example I ran a worksheet and it took more than an hour to run, and the value I get in the qs_act_elap_time column is 2218.313.
    Assuming the unit of measure was seconds than it would mean approx 37 mins. Is that the actual execution time of the query on the database? I guess the actual execution time on my Discoverer client was longer since some calculations were performed at the client level and not on the database.
    I would really appreciate if you could shed some light on this topic.
    Thanks and regards
    Giovanni

    Thanks a lot Rod for your prompt reply.
    I agree with you about the accuracy of the data. Are you aware of any other way to track the execution times of Discoverer reports?
    Thanks
    Giovanni

  • How to determine the ROWNUM in a Master Detail Form

    Hello,
    I am working in a Master Detail Form with Orders and Order Items Information; and I created a process that allows the users to select a Product ID on a tabular form, and the next column is populated automatically with the Product Description.
    To achieve that, I followed some instructions by Denes Kubicek (http://apex.oracle.com/pls/otn/f?p=31517:241), but my case is slightly different:
    <ul>I am using a wizard-created tabular form, instead of a manual tabular form; and </ul>
    <ul>Instead of using another page as a Popup to pass the parameter of the ROWNUM, I am using a plug-in called “Tabular Form Super LOV” which is a modified version of the SkillBuilders’ Super LOV that works on Tabular Forms. </ul>
    The Product ID is returned in the correct row by the plug-in; but in the case of the Product Description, it is always returned into the first row; and my problem is that I don't know how to determine the row where the user clicked to call the plug-in.
    I set up an example in apex.oracle.com in case someone would like to look at it:
    Workspace: ediazjorge
    Username: test
    Password: test
    App Name: Sample App
    App Number: 1550
    BTW, I am using Apex 4.1.1.00.23 and Oracle DB 10.3.2.
    Thanks in advance,
    Erick

    Hello VC,
    Thank you for your time and help.
    Unfortunately, it is still not working properly:
    1. When the Popup LOV opens, the first row of the tabular form is 0, the second row is 1, and so on. How can I assign the values starting with 1 and in the format *0001* ? (I am still a novice on Apex and new to JavaScript :-), sorry about that).
    --2. Also, when I close the Popup LOV, the value of P1_ROWNUM is ‘undefined’ again so I'm not sure if the Product Name column will be populated.--
    3. And finally, you are using the jQuery Selector uPopupLOVIcon, which is an attribute of the Cloudy Theme. In my real application (Apex 4.1.1.00.26), my element looks like: *<img src="/i/lov_16x16.gif" width="16" height="16" alt="Popup Lov" alt="List" style="vertical-align:middle;" align="middle" />*. What do you recommend me to use as a jQuery Selector?
    Again, I really appreciate your help and time. I think you solved the most difficult part.
    Thank you so much,
    Erick
    Update: I just found out that the problem with my comment 2 is because I didn’t delete the previous dynamic action that set the value to P1_ROWNUM.
    Edited by: ediazjorge on Sep 18, 2012 11:20 AM

  • How to determine the mount point for directory /tmp ?

    Folks,
    Hello. I am installing Oracle 11gR2 RAC using 2 Virtual Machines (rac1 and rac2 whose OS are Oracle Linux 5.6) in VMPlayer and according to the tutorial
    http://appsdbaworkshop.blogspot.com/2011/10/11gr2-rac-on-linux-56-using-vmware.html
    I am installing Grid infrastructure. I am on step 7 of 10 (verify Grid installation enviroment) and get this error:
    "Free Space: Rac2: /tmp"
    Cause: Could not determine mount point for location specified.
    Action: Ensure location specified is available.
    Expected value: n/a
    Actual value: n/a
    I have checked the free space using the command:
    [root@Rac2 /]# df -k /tmp
    Output:
    Filesystem     1k-blocks     used     Available     Use%     Mounted on
    /dev/sda1     30470144     7826952     21070432     28%     /
    As you see above, the free space is enough, but could not determine mount point for /tmp.
    Do any folk understand how to determine the mount point for directory /tmp ?
    Thanks.

    I have just checked "/home/oracle/.bash_profile". But in my computer, there is no "oracle" under /home directory.Is this your first time Linux and Oracle installation? I had a brief look at your referenced link. The reason why you do not find a "oracle" user is because the instructions use "ora11g" instead, which, btw, is not standard. The directories of your installation and your installation source can be somewhat different from known standards and you will have to adjust it to your system.
    My best guess is that you have either missed something in the instructions or you need to ask the author of the blog what is wrong. The chance to find someone here who has experience with these custom instructions is probably unlikely.
    I suggest you try to locate the cluster verification tool, which should be in the bin directory of your grid installation. Alternatively you might want to check the RAC, ASM & Clusterware Installation forum: RAC, ASM & Clusterware Installation

  • How to determine the field size

    I am going to make a multiplatform application that hopefully
    will run on linux and windows 2000.If the os is 2000, then I will use
    vb.net/aspx else I'll use java servlets. I make the connection
    to the web server ( through HTTP) not directly to database server.
    So, the resultset will be stored in the String object. The columns
    will be separated by delimeter. Our problem is how to determine
    the size and type of the fields of mssql,oracle and postgres database
    so that we can include it in the String object.
    Ex.
    String sResultSet=new String();
    ResultSet rs=statement.executeQuery(sSQL);
    while(rs.next()){
    sResultset=sResultSet + rs.getString(field1) + "||" + rs.getString(field2) + "||";
    vertical bars acts as delimeter
    supposedly this is the code:
    sResultset=sResultSet + rs.getString(field1) +"_" + rs.getFieldType() + "_"+
    rs.getFieldSize() + "||" + rs.getString(field2) +"_" + rs.getFieldType() + "_"+
    rs.getFieldSize() + "||";
    supposedly this is the code if rs.getFieldType() and rs.getFieldSize() methods are existing
    Anyone can give me an idea how to get the field type and field size of the database?
    thanks in advance

    Yes, but I dont know how to do it.
    Can you give me an example of using it.
    Thanks in advance

  • How to track the login time and logout times of clients

    hai
    please give me the solution
    suppose there are 5 systems connected in LAN.
    how to track the login time and logout times of clients
    for a given time(may be one day or 1 hour) using any programming language.
    please give me the solution

    When the client logs in you write the client's ID and the current time to a database. Likewise when the client logs out. Assuming of course that you have a program that knows when those events occur.

  • How to determine the IPS throughput using Cisco ASA 5500 IPS Solution?

    Hello there!
    I´ve been desinging a solution to protect de Server Farm and I intend to use the ASA 5500 series with AIP-SSM module. There´s any tool to determine the real throughput that I need? I mean, how to determine the performance (Firewall + IPS  throughput), what main points I should consinder?

    If the server farm is running production levels of traffic today you can get statistics off a variety of networking devices passing the existing traffic. Switches, routers and firewalls all count every byte of traffic they pass. There are plenty of tools that can gather this traffic into tables via SNMP too, such as MRTG.
    Do not average your traffic over too great a time peroid, you will miss busy hour peaks. At most, use 5 min averages.
    - Bob

  • How to determine the download media required from my License key?

    Hi
    After recently rebuilding a dead PC,  The user has advised me she used to use Illustrator.
    Unfortunately the user does not have the install media available.
    Support advised my license key is a volume license for Design Standard.
    I have downloaded Design Standard (Universal) but the Licence key is not accepted.
    Can anyone advise how to determine the correct download based on my License key?
    Many thanks

    Some times you may need to sign in to volume licensing account and download
    refer
    Adobe Licensing Website | Serial numbers | Orders | Accounts

  • How to determine the second decimal of currency is equal to 0.

    Hi guys,
    My problem is how to determine the second decimal of currency is equal to 0.
    i.e: 130.23 the second decimal is 3.
    Thx in advance.
    Points will be rewarded.

    Hi Vincent,
    if you want to check the internal currency value, you can not know from the field contents what is the second decimal. Because ABAP currency fields (CURR) are connected to currency key CUKY. For USD or EUR you have two decimals, japanese yen have no decimals where as some arabian pound have three decimals. The default are 2 decimals; all excetions can be found in table TCURX.
    If you WRITE the value it is converted correctly according to the connected currency.
    Just multiply the value with 10 to the power of decimals, e.g. USD value * ( 10 ** 2 ). Then do a MOD: second_decimal_of_currency = ( value * ( 10 ** decimals ) mod 10.
    If result is zero, then the second decimal of currency is equal to 0.
    Regards,
    Clemens

  • How to Troubleshoot the Connection Pool Exception?

    Dear Oracle Gurus, very good afternoon to you.
    I'm looking forward for some tips/troubleshoting guide to escape from the below exception, that occres very frequently to one of application that 100+ users will login from different locations & work on and update the data and save their work, where all in sudden they can't acces the application and it gets down.
    Most of the times in the server log I observed below.
    weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool RemoteDesktop.main to allocate to applications, please increase the size of the pool and retry..
    Please help me on, how to overcome this kind of exception.
    In Weblogi c server I see below kind of Warnings.
    If you set the buffer size to zero in a servlet, it would fail to respond and would initiate an infinite loop in the server. WebLogic Server would ultimately display a Errors:
    ExecuteThread: '157' for queue: 'weblogic.kernel.Default' has been busy for "633" seconds working on the request "Http Request: : ../updates/process_manager.jsp", which is more than the configured time (StuckThreadMaxTime) of "600" seconds.
    I searched over google for this kind of error, See otherusers posted the same kind of errors but didn't have any positive replies to troubleshoot this issue.
    I also got Oracle Dev link on Weblogic version upgrade product where they fixed similar kind of error it seems. Which is shown below.
    http://docs.oracle.com/cd/E13222_01/wls/docs61/notes/bugfixes2.html -- BUG # CR106186
    details:
    "Suspend Checker Thread" prio=10 tid=0x23eb90 nid=0xfec runnable
    <May 14, 2003 10:53:34 AM PDT> <Warning> <WebLogicServer> <000337>
    <ExecuteThread: '10' for queue: 'default' has been busy for "1,181" seconds working on the request "Http Request: servlet_uri", which is more than the configured time (StuckThreadMaxTime) of "600" seconds.>
    This problem was solved with a code fix.
    Looking forward for some help, Thank you inadvance.
    FYI..
    I'm using oracle thin driver JDBC connection/Weblogic 8.1
    Edited by: user1072948 on Apr 26, 2012 11:55 AM

    I agree that looking into the number of connections that you have open when you see
    weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool RemoteDesktop.main to allocate to applications, please increase the size of the pool and retry..
    would be a good idea; but I would suggest that you don't increase without thinking about the consequences. I would look more closely at what the connections to the database are doing, for instance, how long are the connection being left open for? What are the queries that are being run? Should you expect to see all the connections in the connection pool being used? What is the current connection pool limit? Are you simply going to increase the number of connections to find that they are also waiting? What is the load on the database at the time?
    It's the other error that you say you see
    ExecuteThread: '157' for queue: 'weblogic.kernel.Default' has been busy for "633" seconds working on the request "Http Request: : ../updates/process_manager.jsp", which is more than the configured time (StuckThreadMaxTime) of "600" seconds.
    What does this JSP do? Why would this be busy for so long? Is it related to the previous exception that you have? I'd ask you delevelopment team to look into this.
    In short, it sounds like you have load issues on your server(s) and a careful tuning of the system after a full analysis (thread dumps, heap profiling, connection pool monitoring and code review) would probably be beneficial. It may be that restricting the thread pool may help, it may be that increasing the connection pool would help. I'd not plump for a quick fix here.

Maybe you are looking for

  • SanDisk eject error message and improper upload of pictures Aperture 3

    My Macbook Pro seems to corrupt or damage SanDisks.  I just uploaded a 16 GB disk which only uploaded about 30 out of 400 pictures into Aperture 3.  It was a new disk. At first it showed all the pictures and looked as if it downloaded.  When I ejecte

  • [evince] image printing is disabled

    .. at least it is so for png and jpg. With pdf and djvu files printing is enabled. I have not gnome installed - openbox is in use. Optional deps list hasn't anything related. Where to dig in?

  • Genius results can't be updated right now. An unknown error occured (13010)

    Hi Folks, I have been getting this error for some time everytime I turn Genius on.  I have tried deleting "iTunes Library Genius.itdbi" from my iTunes fold as some have said but this does not fix it.  I have now registered with iTunes Match and it co

  • Staying Connected Pop Up Message

    Im feeling a little slow and annoyed. i got my macbook pro a few weeks ago and since i got it as long as i have been connected online either wireless or wired, a message pops up that says " your internet connection is still active. would you like to

  • Using Picassa with iPhoto

    I'm able to export my photos to Picasa using iPhoto but unfortunately, the comments from iPhoto don't show up in Picasa. It says in the Picasa webpage that those comments would be imported too. What am I doing wrong? Is there a setting button that I