0

Getting deadlock error, during INSERT statements:

Key:

insert into status (userid,lastactivity,lastseen) 
                 values ('10691250','1536136821','1536136821') 
      on duplicate key update lastactivity = '1536136821',
                              lastseen = '1536136821' 

SQL:

`insert into status (userid,lastactivity,lastseen) 
                  values ('10691250','1536136821','1536136821') 
      on duplicate key 
      update lastactivity = '1536136821',
             lastseen = '1536136821'`

Error:

Deadlock found when trying to get lock; try restarting transaction

Madhur Bhaiya
  • 28,155
  • 10
  • 49
  • 57
Mayur Shedage
  • 1,027
  • 2
  • 11
  • 19
  • Possible duplicates: https://stackoverflow.com/questions/2332768/how-to-avoid-mysql-deadlock-found-when-trying-to-get-lock-try-restarting-trans and https://stackoverflow.com/questions/2596005/working-around-mysql-error-deadlock-found-when-trying-to-get-lock-try-restarti – RobIII Sep 11 '18 at 12:35
  • Thanks for reply but I already check the provided link. – Mayur Shedage Sep 11 '18 at 12:37
  • 2
    Then you could've _at least_ mentioned _that_ in your question (along with all the proposed solutions in there that you, supposedly then, also tried). Your question contains no information whatsoever besides a query and an error. – RobIII Sep 11 '18 at 12:38

0 Answers0