web stats
Newest version of Mirth still deadlocks - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-13-2014, 01:48 PM
spaterson spaterson is offline
OBX.2 Kenobi
 
Join Date: Feb 2012
Posts: 61
spaterson is on a distinguished road
Default Newest version of Mirth still deadlocks

Hello,

I was getting no deadlocks with 2.2, a lot with 3.0.0 and now less with the newest version - 3.0.2.7140.

Is this still an open bug? Any resolution?

Thanks,
Scott
Reply With Quote
  #2  
Old 05-13-2014, 01:56 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

You're going to need to supply more information than 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.
Reply With Quote
  #3  
Old 05-13-2014, 02:03 PM
spaterson spaterson is offline
OBX.2 Kenobi
 
Join Date: Feb 2012
Posts: 61
spaterson is on a distinguished road
Default

My situation is about the same as this:

http://www.mirthcorp.com/community/i...wse/MIRTH-3042

Inbound channels that are MLLP listeners sending to multiple channel-reader type destination - two in my case. Second destination is already set to wait for previous destination.

Code:
[2014-05-13 17:06:01,093]  ERROR (com.mirth.connect.donkey.server.channel.Channel:1530): An error occurred in channel AHC-HDL-ORU-001-IN Observation Result (05eeb396-f945-4302-8fae-df165bd4ceec) while processing message ID 646 from the source queue
com.mirth.connect.donkey.server.data.DonkeyDaoException: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
	at com.mirth.connect.donkey.server.data.jdbc.JdbcDao.updateStatus(JdbcDao.java:728)
	at com.mirth.connect.donkey.server.data.buffered.BufferedDao.executeTasks(BufferedDao.java:107)
	at com.mirth.connect.donkey.server.data.buffered.BufferedDao.commit(BufferedDao.java:74)
	at com.mirth.connect.donkey.server.data.buffered.BufferedDao.commit(BufferedDao.java:56)
	at com.mirth.connect.donkey.server.channel.Channel.process(Channel.java:1394)
	at com.mirth.connect.donkey.server.channel.Channel.processSourceQueue(Channel.java:1528)
	at com.mirth.connect.donkey.server.channel.Channel.run(Channel.java:1515)
	at java.lang.Thread.run(Unknown Source)Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.Util.getInstance(Util.java:386)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1066)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2815)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2375)
	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2359)
	at com.mirth.connect.donkey.server.data.jdbc.JdbcDao.updateStatus(JdbcDao.java:724)
	... 7 more
Reply With Quote
  #4  
Old 05-13-2014, 04:59 PM
wayneh wayneh is offline
OBX.3 Kenobi
 
Join Date: May 2012
Posts: 102
wayneh is on a distinguished road
Default

Can you post a copy of your channel that is deadlocking (make sure you remove any passwords/PHI/etc)

Also what version of MySQL are you running as your backend database?
Reply With Quote
  #5  
Old 05-14-2014, 08:14 AM
spaterson spaterson is offline
OBX.2 Kenobi
 
Join Date: Feb 2012
Posts: 61
spaterson is on a distinguished road
Default

Hi wayneh and narupley,

I am using MySQL 5.6.14 X86

Ill be happy to post my channel, but let me ask one question first. Is there an easy way to queue and retry on deadlock for source TCP - MLLP listeners?

I usually only get 1-2 deadlocks in a row, then it works; so if I can get an easy workaround by retrying a few times then that is fine with me.

Thanks,
Scott
Reply With Quote
  #6  
Old 05-14-2014, 08:29 AM
spaterson spaterson is offline
OBX.2 Kenobi
 
Join Date: Feb 2012
Posts: 61
spaterson is on a distinguished road
Default

Please find channel attached.
Attached Files
File Type: xml AHC-HDL-ORU-001-IN Observation Result.xml (91.9 KB, 24 views)

Last edited by spaterson; 05-14-2014 at 08:32 AM.
Reply With Quote
  #7  
Old 05-15-2014, 09:39 AM
wayneh wayneh is offline
OBX.3 Kenobi
 
Join Date: May 2012
Posts: 102
wayneh is on a distinguished road
Default

Is your MySQL server running on Windows or Linux? I'm able to reproduce but only on Linux
Reply With Quote
  #8  
Old 05-19-2014, 09:59 AM
spaterson spaterson is offline
OBX.2 Kenobi
 
Join Date: Feb 2012
Posts: 61
spaterson is on a distinguished road
Default

Hi wayneh,

It's running on Windows - 03 R2 x86. Same server as Mirth.

Even with Linux, do you have a solution? Or advice for me?

Thanks,
Scott

Last edited by spaterson; 05-19-2014 at 10:28 AM.
Reply With Quote
  #9  
Old 05-19-2014, 11:02 AM
wayneh wayneh is offline
OBX.3 Kenobi
 
Join Date: May 2012
Posts: 102
wayneh is on a distinguished road
Default

I wasn't able to reproduce the exact same deadlock you mentioned, but it seems to have something to do with the queues. In your case it looks like its deadlocking at the source queue. The first step you can try is disabling the source queue for that channel and see if it makes a difference.

I've created an ticket in our issue tracker so we can look into it
http://www.mirthcorp.com/community/i...wse/MIRTH-3280
Reply With Quote
  #10  
Old 05-19-2014, 12:04 PM
spaterson spaterson is offline
OBX.2 Kenobi
 
Join Date: Feb 2012
Posts: 61
spaterson is on a distinguished road
Default

Hi Wayneh,

The deadlocking is occurring on the source.

If I set the source queue to: Off (Respond after processing), and I have my response set to: Auto-generate (before processing). It never sends an ACK back and my HL7 sender eventually times out. I have tried changing the response to other options, but an ACK is never sent back unless source queue is set to: On.

Thanks,
Scott
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:02 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation