Skip to Content

JDBC Receiver Adapter with many deadlocks

Hi Gurus !

Hi have many interfaces from Idocs to JDBC inserts to a MS SQL Server 2005. I'm using PI 7.0 SP 18.

I'm having a problem when I send many idocs (with many segments) because some messages stay in waiting, or, to be delivered status at the endpoint in message monitoring. The real message is:

Unable to execute statement for table or stored procedure. 'EQUI' (Structure 'JDBCStatement_EQUI') due to Transaction (Process ID 63) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

It makes 6 retries, and after the sixth failure it stays in status NDLV. Every time that tries to resend the message it makes the same error (deadlock), I guess because there are many messages that are trying to do the same in same moment.

In the receiver CCs I put the value 50 in the Maximum Concurrency field.

Does anyone know which parameters can I improve this situation? The server hasn't any tunning.

Thanks in advance,


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Oct 19, 2009 at 02:30 PM

    Based on my experience, these are the things that could be used to improve JDBC performance

    1. You may increase the thread count for JDBC related queues. This has to be done in accordance with SAP Note 1084161.

    2. There is parameter in JDBC communication channel called Maximum Concurrency. It signifies that one communication channel can make how many connections to database. This is 1 by default and could be increased to some values like 3-4.

    3. In the Visual Admin/ NWA, there is a parameter called as queueParallelism.maxReceivers which defines the number of parallel worker threads for one receiver channel instance. This should be done following SAP Note 1136790. This can be done along with the first point.



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2009 at 05:29 AM

    Hi Juan,

    Apart from what prateek said also do the following on the SQL Server 2005 side....

    To reduce the chance of a deadlock:

    1)Minimize the size of transaction and transaction times.

    2)Always access server objects in the same order each time in application.

    3)Reduce lock time in application.

    4)Use query hints to prevent locking if possible (NoLock, RowLock)

    5)Select deadlock victim by using SET DEADLOCK_PRIORITY.



    Add comment
    10|10000 characters needed characters exceeded

  • Jun 11, 2015 at 11:30 AM

    Hi Juan,

    is the deadlock Problem solved?



    Add comment
    10|10000 characters needed characters exceeded