Interaction - Open Linked

Interaction records have realted records but the status is not changing from Open - Idle to Open Linked. The log file for linker process has the below errors in it

 

19267716(39452773) 11/09/2016 14:08:56 RAD I ERROR;HTML Templates;getTemplate;Language determination: Record contains invalid code
19267716(47841289) 11/09/2016 14:08:57 JRTE I LockHandler: Lock was held for 6204 ms. Lock: Key:incidents;SD11262964, IP:10.18.51.57, PID:19267716, TID: 39452773, SID: 50341, Retry: 0
19267716(47841289) 11/09/2016 14:08:57 JRTE I LockHandler: Lock was held for 18478 ms. Lock: Key:SCHEDULE99890884, IP:10.18.51.57, PID:19267716, TID: 39452773, SID: 50341, Retry: 0
19267716(39452773) 11/09/2016 14:08:59 RAD I ERROR;HTML Templates;getTemplate;Language determination: Record contains invalid code
19267716(39452773) 11/09/2016 14:10:22 RTE I Lock is already obtained by someone else.

 

What is causing this Lock? How can i break this and is this causing the records not getting updated as Open Linked?

  • 12320808(7930223) 11/09/2016 13:41:15 JRTE I LockHandler: Lock was held for 59354 ms. Lock: Key:SCHEDULE167207854, IP:10.18.51.57, PID:12320808, TID: 37748875, SID: 50497, Retry: 0
    12320808(37748875) 11/09/2016 13:41:47 RTE I -Memory : S(361881872) O(101292828) MAX(463174700) - MALLOC's Total(2009184191)
    12320808(7930223) 11/09/2016 13:42:16 JRTE I LockHandler: Lock was held for 61972 ms. Lock: Key:SCHEDULE167207855, IP:10.18.51.57, PID:12320808, TID: 37748875, SID: 50497, Retry: 0