Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

JDBC Connector error. Deadlock victim

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

  • JDBC Connector error. Deadlock victim

    Has anyone seen this issue before? I am not receiving this error every time I am updating the database. But, it is happening enough it is causing problems. The backend is 2005 SQL Server. It is just a simple Insert with some transforms associated with it. Any help would be appreciated.


    ERROR-406: JDBC Connector error
    ERROR MESSAGE: Error writing to database:
    java.sql.SQLException: Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

  • #2
    Re:JDBC Connector error. Deadlock victim

    aingram wrote:
    Has anyone seen this issue before? I am not receiving this error every time I am updating the database. But, it is happening enough it is causing problems. The backend is 2005 SQL Server. It is just a simple Insert with some transforms associated with it. Any help would be appreciated.


    ERROR-406: JDBC Connector error
    ERROR MESSAGE: Error writing to database:
    java.sql.SQLException: Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
    I've seen it before. Its a concurrency issue between your query and some other query that wants a lock on a table.

    Google for "Transaction was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction" and it should turn up some specific SQL Server hints that will prevent the issue.

    As far as coping with this in Mirth goes you can run your query in JavaScript and catch the exception that is thrown from executing the query. If that execption is of this type then wait a moment and rerun the query. That is just a coping mechanism though, the real solution is to tweak the query to not deadlock.
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.

    Comment


    • #3
      Re:JDBC Connector error. Deadlock victim

      Hello aingram !
      Did you find your solution. I am getting the same exception. Can you tell me wtas the solution
      nabeelkhan132 at gmail dot com

      Comment


      • #4
        Re:JDBC Connector error. Deadlock victim

        Nabeel wrote:
        Hello aingram !
        Did you find your solution. I am getting the same exception. Can you tell me wtas the solution
        nabeelkhan132 at gmail dot com
        Did you follow the suggestions that I posted?
        Jon Bartels

        Zen is hiring!!!!
        http://consultzen.com/careers/
        Talented healthcare IT professionals wanted. Engineers to sales to management.
        Good benefits, great working environment, genuinely interesting work.

        Comment


        • #5
          Re:JDBC Connector error. Deadlock victim

          I did. But we still had issues. So, we added another DNS on the server and referenced that instead for certain sql statements. That seemed to work. I am still testing it out though. Thanks for your reply.

          Comment


          • #6
            Re:JDBC Connector error. Deadlock victim

            Check the logs / Activity Monitor to see "Blocked By" and "Blocking" process

            SQL Server 2005 Management Studio / Your Server / Management / SQL Server Logs

            SQL Server 2005 Management Studio / Your Server / Management / Activity Monitor

            Make sure the database tables have required indexes. Refer following articles on performance tuning.
            Have You Tried the SQL Server Profiler 2005 Blocked Process Report?
            http://sql-server-performance.com/Co...ss-report.aspx

            Tuning Up SQL Server 2005 Databases
            http://www.developer.com/db/article.php/3607186

            Troubleshooting Performance Problems in SQL Server 2005
            http://www.microsoft.com/technet/pro.../tsprfprb.mspx

            Hope this helps!

            Comment


            • #7
              Possible fix ....

              See this post - http://www.mirthcorp.com/community/f...7211#post17211 - it may point you in the the right direction for a solution.

              Thanks,
              Frans
              Frans de Wet
              Uber Operations LLC

              Phone: (850) 445-7696

              Comment

              Working...
              X