Database connection timeouts and datasource errors

Connections in the pool randomly die overnight. Stack traces show that for some reason, the evermind driver is being used even though the MySql connection pool is specified.
Also, the evermind connection pool is saying connections aren't being closed, and the stack trace shows they're being allocated by entity beans that are definitely not left hanging around.
Sometimes we get non-serializable errors when trying to retrieve the datasource (this is only after the other errors start). Some connections returned from the pool are still good, so the application limps along.
EJBs and DAOs both use jdbc/SQLServerDSCore.
Has anyone seen this problem?
<data-sources>
     <data-source
          class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"
          name="SQLServerDSCore"
          location="jdbc/SQLServerDSCore"
          xa-location="jdbc/xa/SQLServerXACore"
          ejb-location="jdbc/SQLServerDSCore"
          connection-driver="com.mysql.jdbc.Driver"
          min-connections="5"
          username="xxx"
          password="xxx"
          staleness-timeout="3600"
          alive-poll-query="SELECT 1 FROM medispan"
          url="jdbc:mysql://1.2.3.4:3306/dbo?autoReconnect=true&autoReconnectForPools=true&cachePrepStmts=true&is-connection-validation-required=true"
          inactivity-timeout="30"
     >
          <property name="autoReconnect" value="true"/>
          <property name="autoReconnectForPools" value="true"/>
          <property name="is-connection-validation-required" value="true"/>
          <property name="cachePrepStmts" value="true"/>
     </data-source>
</data-sources>

Rick,
OC4J 9.0.4.0.0 - BTW, do you know of any patches?As far as I know, there are no patches for the 9.0.4
production version of OC4J stand-alone.
I'm using container managed persistence,It was not clear to me, from your previous post, that you
are using CMP entity beans.
I found staleness-timeout and alive-poll-query
somewhere on a website when trying to track this
down. Here's four sources:Those sources refer to OrionServer -- and an older version, too, it seems.
Like all other Oracle products that start out as somebody
else's -- including, for example, JBuilder (that became "JDeveloper"), Apache Web Server (that became "Oracle HTTP Server") and TopLink -- their development paths diverge, until, eventually, there is absolutely no similarity between them at all. Hence, the latest versions of OC4J and "OrionServer" are so different, that you cannot be sure that something that works for "OrionServer" will work for OC4J.
I recall reading something, somewhere, sometime about configuring OC4J to use different databases (other than Oracle), but I really don't remember any details (since it was not relevant to me, because we only use Oracle database). In any case, it is possible to use a non-Oracle database with OC4J.
Good Luck,
Avi.

Similar Messages

  • Shell Script: Timeout and return error if Sqlplus hangs

    Shell Script: Timeout and return error if Sqlplus hangs
    Dear all,
    This morning, our production database hung with lots of ORA-600 and 7445. The issue has been escalated to Oracle Tech support but my monitoring script which tries to make a connection every 5 mins to the database to see if its up, did not alert me. The reason is that, it connected to the database and hung, never came out to report an error and so I never got alerted until a user called me.
    Can any one tell me how I can exit from the sqlplus block if I dont get a response in x seconds? This sqlplus block is being called with in a shell script.
    Any help is highly apprciated.

    I don't know of anything built into any shell scripting language that would do this, no. I'm not a Perl programmer, but I have a vague recollection that Perl may have something useful here.
    From the "separate thread" part of my comment, though, you could certainly spawn a separate thread (thread 2), have thread 2 wait a period of time, then look for a message from thread 1 and throw an error if the message hadn't been sent. I don't know that I'd be for writing multi-threaded shell scripts, though. The heartbeat also gives you a layer of redundancy so that something is monitoring the monitor in case that process stops working.
    Justin

  • Is there a risk of setting a console connection timeout and what is the recommended setting?

    Is there a risk of setting a console connection timeout and what is the recommended setting? Please suggest if there is any best prctice documentation that can be referred.

    Hi Henrik
    depend on what you need or what your security policy says for my lab gear i use 60 minutes. because i know how can access this. if you have gear outside in insecure space set it to a minimum or disable the console. everybody how can access your gear can break in. simple restart and boot w/o config. and you are in.
    it realy depends how secure is your space and how much security you need.
    and than the settings for policy have to match, what sec do you have if your console login and logout is secure. but when you restart you can simple break in by starting w/o config and than load it.
    HTH
    Patrick

  • Macbook pro keeps saying connection timeout, and it used to connect to the internet fine. what's up, why can't it find and automatically connect to the internet anymore???

    Macbook Pro keeps saying connection timeout and it used to connect to the internet fine. What's up, why can't it find and automatically connect to the internet anymore???

    Like this: https://discussions.apple.com/thread/2775868?tstart=0  ?

  • My MacBook Pro persistently will not connect to my wireless router. The message "connection timeout" appears. What is a connection timeout and how can I fix?

    My MacBook Pro persistently will not connect to my MiFi Verizon wireless router. The message "connection timeout" appears. What is a connection timeout and how can I fix?

    Hi there terri900!
    You may want to try configuring your router settings to match the recommended settings for iOS and OS X devices, which can be found here:
    iOS and OS X: Recommended settings for Wi-Fi routers and access points
    http://support.apple.com/kb/ht4199
    You may also find some helpful information for troubleshooting this issue in this article, which can help you with any manner of issues with Wi-Fi connections:
    Wi-Fi Quick Assist
    http://support.apple.com/kb/HT1145
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • Listener EA2: database connection pool and connection revalidation

    Hi all,
    As one can expect from early adopter release there could be some bugs but I can't find any references in forum to my situation:
    * My 11g XE database and listener are starting as windows services when server boots operating system (Windows Server 2003 R2).
    * I configured my web server (unsupported Jetty 9.0.0.M1) to start as windows service when operating system starts.
    * Apex Listener 2.0.0.268.17.05 configured to connect with XE using JDBC thin driver with default settings (initial pool size 3, max statements 10, min connections 1, max connections 10, inactivity timeout 1800, abandoned connection timeout 900)
    * Because web server starts a bit faster than Oracle database when apex connects first time it gets "ORA-12528, TNS:listener: all appropriate instances are blocking new connections" (could be that database still starting but already registered service with listener)
    * From listener.log file I can see that all further connections made from Apex listener succeeds
    * When I try to open any apex page with browser I am getting 404 error and apex listener logs error (*time is 2 days after system startup*):
    2012-11-30 3:56:02 PM oracle.dbtools.common.config.db.DatabaseConfig badConfiguration
    SEVERE: The pool named: apex is not correctly configured, error: Listener refused the connection with the following error:
    ORA-12528, TNS:listener: all appropriate instances are blocking new connections
    ConnectionPoolException [error=BAD_CONFIGURATION]
         at oracle.dbtools.common.jdbc.ConnectionPoolException.badConfiguration(ConnectionPoolException.java:62)
         at oracle.dbtools.common.config.db.DatabaseConfig.badConfiguration(DatabaseConfig.java:146)
         at oracle.dbtools.common.config.db.DatabaseConfig.createPool(DatabaseConfig.java:168)
         at oracle.dbtools.common.config.db.DatabaseConfig.getConnection(DatabaseConfig.java:68)
         at oracle.dbtools.common.jdbc.ora.OraPrincipal.connection(OraPrincipal.java:25)
         at oracle.dbtools.apex.ModApexContext.getConnection(ModApexContext.java:320)
         at oracle.dbtools.apex.Procedure.getProcedure(Procedure.java:166)
         at oracle.dbtools.apex.OWA.validateProcedure(OWA.java:384)
         at oracle.dbtools.apex.security.Security.isValidRequest(Security.java:171)
         at oracle.dbtools.apex.ModApex.validateRequest(ModApex.java:233)
         at oracle.dbtools.apex.ModApex.doGet(ModApex.java:79)
         at oracle.dbtools.apex.ModApex.service(ModApex.java:263)
         at oracle.dbtools.rt.web.HttpEndpointBase.modApex(HttpEndpointBase.java:288)
         at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:127)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
         at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:665)
         <... Jetty web server stack ...>
         at java.lang.Thread.run(Unknown Source)
    2012-11-30 3:56:02 PM oracle.dbtools.rt.web.HttpEndpointBase modApex
    * Oracle listener log for same time (no errors here):
    30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1078)) * establish * xe * 0
    30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1079)) * establish * xe * 0
    30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1080)) * establish * xe * 0
    30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1081)) * establish * xe * 0
    * For some reason apex listener keeps first connection status and won't try to establish new connection if first attempt finished with ORA-12528
    * The same scenario is valid when at time of web server start oracle database/listener is not available - even if database and listener starts and apex successfully establishes further connections all apex pages gets 404 error
    * If I restart web server windows service (while oracle db and listener still running) browser opens apex pages without errors and apex listener does not log any errors
    * I know that I can avoid this error delaying start of web server windows service but it would be nice to have production release 2.x without such bugs

    Hi,
    Is there any way to use the connection pool or Datasource while connecting to database?If I am using a stateless sesssion bean and using a Data Access layer which just creates a database session to write the persistence toplink objects how I can make use of application server connection pool?Hi Vinod,
    Yes, TopLink allows you to use the app server's connection pooling and transaction services. Chapter 2 of the Oracle9iAS TopLink Foundation Library Guide provides details as do the TopLink examples. The easiest way to set this up is by using the sessions.xml file. The sample XML below is from the file <toplink903>\examples\ias\examples\ejb\sessionbean\sessions.xml. Here we are adding the datasource defined in OC4J and specifying that we are using the OC4J transaction controller also.
    <login>
    <user-name>sa</user-name>
    <password></password>
    <datasource>java:comp/env/jdbc/ejbJTSDataSource</datasource>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    </login>
    <external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
    When using this approach you need to change your TopLink code slightly in the EJB methods:
    a. Acquire the ACTIVE unit of work from the server
    session (again, see the EmployeeSessionEJB code
    example) with something like:
    UnitOfWork uow = clientSession.getActiveUnitOfWork();
    b. Calls to uow.commit() can be ommitted or commented out
    because the EJB will handle this. Note that of course
    the methods you create in the EJB that are using this
    approach must have TX Required (default).
    Hope this helps.
    Pete

  • Why does it take over 2 minutes to get a database connection from the DataSource?

    Hello,
    It is taking over 2 minutes for my application to get a connection from a registered DataSource in iAS 6.0 sp4 on Solaris. The proper results are returned it just takes 2 minutes to establish the connection. The DataSource is an Oracle 9i database. I have the 9i drivers in the classpath. I also have a registered datasource that is an Oracle 8 database and have no problems establishing a connection quickly to that database. As an aside I have setup this application on JBOSS and both datasource's return a connection very quickly. If anyone has any ideas about what might be going on please respond. This issue is holding up a production release.
    Here is the code:
    try {
    log.debug("getting a new initial context");
    ctx = new InitialContext();
    ds = (DataSource) ctx.lookup(bundle.getString("IW_DATASOURCE"));
    log.debug("after looking up datasource from initial context");
    } catch (NamingException e) {
    log.error(e);
    throw new FinstarException
    (bundle.getString("E-0001"));
    try {
    log.debug("about to get connection");
    conn = ds.getConnection();
    log.debug("after getting connection");
    Produces this in the logs:
    2002-05-29 08:55:12,859 DEBUG org.mitre.mii.project.finstar.FinancialSummary - about to get connection
    2002-05-29 08:57:24,963 DEBUG org.mitre.mii.project.finstar.FinancialSummary - after getting connection
    Here is the datasource registration file:
    <ias-resource>
    <resource>
    <jndi-name>jdbc/pdc/IWDataSource</jndi-name>
    <jdbc>
    <database-url>jdbc:oracle:thin:@xxx.xxx.org:1521:acisdb</database-url>
    <datasource>jdbc/pdc/IWDataSource</datasource>
    <username>XXXXX</username>
    <password>XXXXX</password>
    <driver-type>OracleThinDriver</driver-type>
    </jdbc>
    </resource>
    </ias-resource>

    Have you tried to eliminate everything extraneous. In other words, do you experience the same delays with a simple Java program (no lookups, JNDI) that loads the drivermanager and creates a connection.
    Do you have access to a traciong JVM or some program that captures run-time execution timing information? Even without the source, this will tell you the specific class::methos where time is spent so you can better determine where the delay is ocurring.

  • Database connectivity timeout problem

    I am using struts framework for my web application and in between just for a test I have used spring framework database connectivity too in few files. I have deployed my application on tomcat 5.5 server on linux machine. Application is running fine, but sometimes this application shutdown by itself and I have to restart tomcat again (like 3-4 times a month). I wan to run this application continuously. I am getting this error in my log files
    1 Error: DAO.SpringInformDAO[ERROR](SpringInformDAO.java:loadTypelessNameIDListProduct:246)org.springframework.dao.DataAccessResourceFailureException: StatementCallback;
    2.Caused by: com.mysql.jdbc.CommunicationsException: The last packet successfully received from the server was40524 seconds ago.The last packet sent successfully to the server was 40524 seconds ago, which is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
    3. Caused by: java.net.SocketException: Broken pipe
    Does someone has any idea how to solve this problem?? It would be great help
    Thanks

    mantoo wrote:
    Thanks for reply. Ok let me explain again, may I was using wrong words. Actually, my web application stops automatically after few hours, I don't know know what is the reason, whether it is tomcat or sql sever. What I concluded from various Google search that it might be because of sql server waiting time and connection ideal time difference does not match. By default SQL server's wait_time is 8 hours, so after that this errors occurs. For dealing this I put following attributes in my resource tag in context.xml.
    (testWhileIdle="true" timeBetweenEvictionRunsMillis="10000" minEvictableIdleTimeMillis = "60000" )
    After doing this I am not getting those errors which I have written in my previous post, but now it is showing this :
    ERROR: transport error 202: handshake failed - received >GET http://www< - excepted >JDWP-Handshake< ["transport.c",L41]
    JDWP exit error JVMTI_ERROR_NONE(0): could not connect, timeout or fatal errorListening for transport dt_socket at address: 8000So the real problem is that tomcat is exiting. It isn't crashing, just exiting.
    Database problems would not cause that. Excluding the possibility that the driver is calling System.exit() - in which case you would be using a non-standard driver.
    Other reasons for application exit.
    1. Your code, or some library that you use is calling System.exit().
    2. Your JNI code or some library that uses JNI code has a library in C/C++ that is calling the OS application exit in that code.
    3. Tomcat probably has some API that allows you to stop it - some place the java code is calling it
    4. Some other process outside of tomcat is terminating the application.
    Greping can potentially eliminate some of the possibilities above.
    As for 4 you can analyze the shutdown time to determine if it shuts down at the same time or after the same amount of time.

  • Database connection timeout

    We have successfully developed reports in CR XI and have been testing these reports on our website. All the tests had been going great until we realized that if the server was down we received a timeout error and then a connection information box asking for the connection information i.e. Server, User Id, Password, Database etc.. We obviously do not want our customers to see this information.
    My question is, what can we do to prevent them from seeing this information when the connection to the database server is not online? Our first thoughts where to do something in the report to simulate a request for something with no data. That doesnt seem to work. Any ideas would be helpful.
    We are using a OLE DB (ADO) connection.

    Hi Tom
    Set the "Connect Timeout" property a larger value, or just set it to 0, which means no limit for timeout. This property is available while creating report and also in the Set Data Source Location you can edit the Connect timeout.
    Hope this helps!
    Thanks

  • Time Capsule woes -- Connection timeouts and can't connect with one Macbook

    This is my second Time Capsule. Here's the scenario:
    I have a Netopia 3347 DSL modem. That feeds into the Time Capsule in bridge mode. There is a MacBook (metal case), iBook (yes, it's old), two iphones, a color printer and an iPad that can all connect to the Time Capsule just fine. The problem is my MacBook can't connect. The offending computer is a 2.2Ghz Intel Core 2 Duo running SL 10.6.6. This computer can connect to the Netopia just fine, so I know its internal Airport works. After several go arounds with Apple tech support, I'm still nowhere.
    Here are the symptoms:
    1. I can see the TC's network SSID in the airport pull down menu. If I select the TC, a popup appears and asks for a password. If I enter the password, I'll get a connection timeout error.
    2. On the rare occasions where it does connect, I can't open a webpage. Network diagnostics has red dots for ISP Internet and Server
    3. On the even rarer occasions where it does connect, and I can access a webpage, it's unbearably slow, and the no-surf problem reappears after a few seconds. The red dots on the Network Diagnostics reappear.
    Apple tech support was not helpful. I've power cycled everything a million times (and that doesn't explain why other computers can connect.) I know it's not my computer, because it can connect to the Netopia just fine.
    I am STUMPED.

    Magnificent! Problem solved...   Isn't there a "this solved my problem" button somewhere??  Thanks and thanks again!

  • How dynamically create connection pool and Datasource

    Hi
    How I can dynamically create a connection pool and Data source in Oracle 10g Application server. In our J2EE application the user will be login with db user name, password and database name. I want to create connection pool and data source on the fly while login the user with database name. I our application we have access approximate 80 Databases. so my approach is given bellow
    1) Planning to create 80 connection pools and 80 Data sources so when user logs in while selecting the db name i will call the appropriate data source and create the DB connection. Is there any limitation to create number of data sources in oracle app server?
    2) Create DB connection with out using connection pool and data source. But i am not prefer this approach coz we need to handle some transaction in our application.
    Kindly throw some light on managing connection pool programmatically or in application run time.
    I would really appreciate if any one can provide any links or any inormation on this issue.
    Thanks in advance.

    Kindly let me know is there any drawbacks to create 80 Data Sources to connect 80 database in Oracle 10G App server and each data sources should have one connection pool. so i need to create 80 connection pool. Please let me know is this right approach or any work around to create Data source on fly for each request for corresponding database.

  • Labview Database Connection Toolkit and decimal point

    Hi,
    on my system I use "," (comma) as decimal point.
    In Labview Options I unflagged "Use localized decimal point", and numeric controls and indicators use "." (dot) as decimal point.
    The problem is that Labview Database Connection Toolkit keeps returning floating point numbers as strings with comma as decimal point.
    Has anyone experienced this issue?
    Is this related to Labview or MySQL ODBC Connector (that I'm using to connect to a mySQL DB)?
    Thanks in advance for any help,
    Marco

    You have two or three places to look. First there is the DCT. Second, there's a couple layers there that could cause problems (the mySQL drivers and ADO) and then there's even the posibility that the issue could be in the DBMS itself.
    I would start by burrowing down through all the DCT layers and find the spot where the results are actually being read back fromt he database. If the resutls are read as variants and converted to LV datatypes, the problem is on the LV side. If the values are being read as strings and converted, the problem coiuld be on the other side.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Parallel database connection​s and single query between databases

    Hi, I am looking to execute this SQL query between 2 different databases to update a local database based on data selected from a remote one.
    e.g.:
    - Local database name: db1
    - local database schema: dbo
    - local database table1
    - remote database name: db2
    - remote database schema: dbo
    - Remote database table: table2
    - Query: "SELECT * FROM db2.dbo.table2 WHERE NOT EXISTS(SELECT * FROM db1.dbo.table1)" <- This gets e the record set i would need to insert, and I already have a vi to do that kinda thing.
    How do I go about this?
    Thanks,
    Mohamed

    Mohamed,
    There is a VI in the Database Connectivity Toolkit that allows you to execute SQL queries:  DB Tools Execute Query.
    http://zone.ni.com/reference/en-XX/help/370016E-01​/lvdatabase/db_tools_execute_query/
    Is this what you are looking for?
    Drew T.
    NIC AE Specialist

  • Database connectivity toolset and nested transaction

    Is it possible to make nested transactions with the Database Connectivity Toolset ?
    By nested transactions I mean that I want to open a transaction inside a transaction.
    I use LabVIEW 6.1 and Database Connectivity Toolset 1.1
    Any ideas are welcome.

    You may be able to do this in a different manner. Your options depend on how the database has structured the data. For example you can have a table defining "measures", another table defining "measure setps" and so on.
    Each measure has an ID (MID) and each measure step has an ID (MSID) and these can be related to each other to provide the hierarchy. So in this case you could just get a measure, then query for all the measure steps that match (the MID and MSID) and sort them based on some attribute/criteria and work down in that manner.
    This would provide a clean data architecture and enable you to reuse steps in multiple measures if you needed to. I'm not sure how your database is building the hierarchy, in the end there are some parent ch
    ild relationships defined ... these would be very similar to the IDs referred to above.
    Like you said, had to explain without a picture.
    Regards,
    Kamran

  • Database connectivity timeout

    Hello,
       I'm using the database connectivity toolkit to connect to a MySQL database. If the database isn't there or there is a mistake in an SQL query after I have connected my program takes 15s (the default) to realise. I've tried wiring different values to the connection timeout node but this doesn't seem to make any difference whatsoever. I've hacked the first problem by pinging the machine with the DB on before trying to connect as suggested in another post, but this doesn't help if I screw up my INSERT syntax... any ideas what could be wrong?
           Cheers,
                  Tim

    Hi Tim,
    You should be able to use the command timeout (s) parameter of the DB Tools Set Properties VI of the Database Connectivity Toolkit to set the maximum time to wait for a command to execute, in seconds.
    Regards,
    Imtiaz Chowdhury
    Head of Digital Technologies
    Brand786

Maybe you are looking for

  • Battery charging issues, Doesn't make sense

    Hello, and thank you for reading My situation is this. My friend sold me his old late 2009 Macbook 13". He told me he has never had any issues with charging. I have had it around 5 months now, and over that time the charger has got more and more temp

  • AppleTV 2G as wireless access point

    Hi, I thought of the possibility to turn AppleTV 2G as wireless access point when not in use as entertainment, there is an ethernet port and an integrated wifi connection, why not? Need only develop the right application ..

  • Best practice document for SRM

    Hi all Is there a best practice document for SRM setup and Qucksizing tool for SRM-MDM thanks

  • Mac will not do Software Update

    Hi. in my 10.6.2 MAcbook pro Software Update suggests a load of updates amongst others 10.6.3 and so on. I click them all to do them all. It downloads. Then it says you must restart to do the updates (it hasnt done any yet as far as I can see); it re

  • Get the row_number() when running_total reach some amount

    how to Get the row_number() when running_total reach some amount?