Announcement Announcement Module
No announcement yet.
DeadlockLoserDataAccessException Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • DeadlockLoserDataAccessException


    I am experiencing a deadlock issue and I need some help understanding how to correct the problem. First, a little about the application. It accepts an XML file that is saves to disk after validating it. Then a worker thread wakes up and looks for files to process. If it finds one, it will parse it and splits up into multiple XML files. Then another worker thread wakes up and processed the XML file "parts". I added 8 new jobs - 4 new reader threads and 4 new processor threads, for 4 new XSDs I need to support.

    I recently added transaction support to my application and additionally added 8 new jobs being managed by Quartz. I noticed that when I load tested my application (load testing is probably too strong a word - I submitted 15 files of varying size - some upward of 30 MB at the same time), several of the jobs were hanging and my requests were not being processed. I had to restart the application server. Each of the reader and processor threads writes the status of the request to a database table.

    As I was debugging, I changed the timing and now I am getting DeadlockLoserDataAccessException when I attempt to update the status of the submission in the database table. When I removed transaction support (which is ultimately not what I want as I need to rollback), the problem went away and everything processes as I would expect.

    Does anyone have any ideas or suggestions on what I can do?

    I am using Spring 2.5.5, Ibatis, and Sybase. I am using Quartz 1.8.3


  • #2
    More details

    Ok - I have some more information. I was able to pinpoint the problem to using transaction support within Spring.

    Here is what I found out.

    1. I removed transaction support all together and everything ran fine.
    2. I readded transaction support AND updated my tests so there were no expected failures/rollbacks AND still experienced issues, but not as many failures.
    3. I changed the transaction support from doing it declaratively to doing it programmatically. This worked, however I did get one deadlock exception BUT it was handled correctly - the web service client actually received an error rather than the server hanging and becoming unresponsive.

    Any hints/ideas? Should I look into iBatis forums? Sybase forums?