K2 database deadlock error

  • 3 December 2012
  • 6 replies
  • 12 views

Badge +2

An application which uses K2 Blackperl encountered an error and received time out erros on front end too.


Below was the error (from event log) at a point in time:
1 24129 A database error occurred : Cannot insert duplicate key row in object 'dbo._ProcInst' with unique index 'Cl_ProcInst'. Violation of PRIMARY KEY constraint 'PK__ProcInstRevision'. Cannot insert duplicate key in object 'dbo._ProcInstRevision'. Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 1, current count = 0. The statement has been terminated. The statement has been terminated.

After some time another error was logged as below:
1 Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

During this whole process the CPU usage was 100 % and the application hence was unavailable for quite some time. It worked fine only after the server with K2 blackperl was rebooted.
Could someone please let me know the possible cause of this and possible resolutions too? Thanks.


6 replies

Userlevel 4
Badge +14

what version of K2 are you running?


Vernon

Badge +2

Hi Vernon,


Using "4.10060.1.0" version.

Userlevel 4
Badge +14

The version suggests that you are running 4.5 RTM. We have seen similar deadlocks and were fixed in later versions. I would suggest upgrading to a minimum of 4.5 with KB1420. Or alternatively upgrade to 4.6 latest versions.


HTH


Vernon

Badge +2

Thanks for your reply, Vernon.


Could you please let me know the exact procedure to upgrade the version on the hosted server? I mean would upgrading to a newer version affect the exisiting processes on the server by any chance?
I am a newbie to this technology so please let me know.

Badge +2

Also, could you please list out few causes which led to such a deadlock?

Userlevel 4
Badge +14

Download the KB1420 update from here:


https://portal.k2.com/downloads/bp/updates/45/Default.aspx


Nothing should be affected; the installer should keep the configuration as is. All processes etc will continue as normal. Depending on the environment setup. Start by upgrading the K2Server, this will upgrade the db as well. Ensure your installation account has sufficient rights to access db and K2 server.


The installer must be run on all servers hosting K2 components.


HTH


Vernon

Reply