Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tMySQL Output - Deadlock found when trying to get lock; try restarting transaction

Hi All,

I am moving data from one MySQL DB to another MySQL DB.  

A screenshot is given bellow

0683p000009M9IL.png

We are inserting data to "fact_ebilling" where a column have relation with another table (Table A) . A cron job runs to update certain fields of that "Table A". MySQL uses row level locking before performing any action.

I think while inserting data into fact_ebilling, it checks foreign Key which means it read something from "Table A". At the same time cron job require that row to update. Due to this locking conflict an error was sent from MySQL server as follow

 

[statistics] connected
Deadlock found when trying to get lock; try restarting transaction

 

My question is whether  Talend Open Studio would automatically retry to insert those records or else it requires to restart complete Job? 

In case of restarting Job, It would take couple of days to reinsert all the data. Any solution would be appreciated . Thank you

Labels (3)
1 Reply
Anonymous
Not applicable
Author

Hi
You need to restart the complete job if the job throws the exception and stop to run.
Here are more discussions about deadlock issue on stackoverflow.
https://stackoverflow.com/questions/2332768/how-to-avoid-mysql-deadlock-found-when-trying-to-get-loc...

Take a look at it, hope it will give some tips to update the job design to avoid the deadlock issue.

Regards
Shong