Announcement

Collapse
No announcement yet.

JDBC Connector Random error on mysql db

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JDBC Connector Random error on mysql db

    Hello,
    I have a mirth channel that listens to HL7 messages which are then inserted in a InnoDB table in a mysql DB. From time to time (apparently there's no sequence in the error...) I keep getting this error, which is quite annoying since I have to redeploy the channel.... Anyway the error is:

    [2013-01-04 11:42:42,979] ERROR (org.mule.impl.DefaultComponentExceptionStrategy:9 5): Caught exception in Exception Strategy for: 21a0509a-5cc7-4151-b2c9-e32f69b93c61: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, general error
    org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, general error
    at org.apache.commons.dbcp.PoolingDataSource.getConne ction(PoolingDataSource.java:118)
    at org.apache.commons.dbcp.BasicDataSource.getConnect ion(BasicDataSource.java:1044)
    at com.mirth.connect.connectors.jdbc.JdbcConnector.ge tConnection(JdbcConnector.java:425)
    at com.mirth.connect.connectors.jdbc.JdbcMessageDispa tcher.doDispatch(JdbcMessageDispatcher.java:139)
    at com.mirth.connect.connectors.jdbc.JdbcMessageDispa tcher.doSend(JdbcMessageDispatcher.java:162)
    at org.mule.providers.AbstractMessageDispatcher.send( AbstractMessageDispatcher.java:164)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:191)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:130)
    at org.mule.routing.outbound.AbstractOutboundRouter.s end(AbstractOutboundRouter.java:85)
    at org.mule.routing.outbound.FilteringMulticastingRou ter.route(FilteringMulticastingRouter.java:54)
    at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(OutboundMessageRouter.java:78)
    at org.mule.transaction.TransactionTemplate.execute(T ransactionTemplate.java:48)
    at org.mule.routing.outbound.OutboundMessageRouter.ro ute(OutboundMessageRouter.java:82)
    at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul tMuleProxy.java:247)
    at org.mule.impl.model.seda.SedaComponent.doSend(Seda Component.java:209)
    at org.mule.impl.model.AbstractComponent.sendEvent(Ab stractComponent.java:277)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:201)
    at org.mule.routing.inbound.InboundMessageRouter.send (InboundMessageRouter.java:176)
    at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:143)
    at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:487)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:266)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:238)
    at com.mirth.connect.connectors.mllp.MllpMessageRecei ver$TcpWorker.processHL7Data(MllpMessageReceiver.j ava:484)
    at com.mirth.connect.connectors.mllp.MllpMessageRecei ver$TcpWorker.processData(MllpMessageReceiver.java :444)
    at com.mirth.connect.connectors.mllp.MllpMessageRecei ver$TcpWorker.run(MllpMessageReceiver.java:361)
    at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor.runWorker(ThreadPoolExecutor.java: 1061)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :575)
    at java.lang.Thread.run(Thread.java:722)Caused by: java.lang.InterruptedException
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:503)
    at org.apache.commons.pool.impl.GenericObjectPool.bor rowObject(GenericObjectPool.java:1115)
    at org.apache.commons.dbcp.PoolingDataSource.getConne ction(PoolingDataSource.java:106)
    ... 28 more

    I really don't know what do do.. Any help or hint to solve this problem is really appreciated.
    Thanks to all

  • #2
    At first glance, it appears that JDBC isn't able to recover a connection from the pool. What settings do you have tweaked from the default MySQL installation? Have you already tried increasing max_connections?
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


    - How do I foo?
    - You just bar.

    Comment


    • #3
      channel attached

      Hello, thanks for the reply but I don't have the possibility to manage the mysql db since there is a DB admin. What I can do is attaching the channel here so that you could enlight any error in it.

      Thanks a lot
      Attached Files

      Comment


      • #4
        Originally posted by wildeng View Post
        Hello, thanks for the reply but I don't have the possibility to manage the mysql db since there is a DB admin. What I can do is attaching the channel here so that you could enlight any error in it.

        Thanks a lot
        Hmm well, that all looks rather standard to me. I still stand by my original guess, that there's some overarching connectivity problem. The destination connector should be closing the connection after each message, but if there are connectivity issues abound then maybe the connection isn't really being closed on the database server side. If you have admin access, I would definitely look at the session count when this is happening and see if they are being correctly closed, etc. Also look at your tuning settings... maybe your channel is high volume enough as to warrant a bump in max_connections or something like that.
        Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

        Nicholas Rupley
        Work: 949-237-6069
        Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


        - How do I foo?
        - You just bar.

        Comment


        • #5
          Thanks a lot, I will have a talk with the DB admin about the suggestions you gave me

          Comment

          Working...
          X