# Ttn uplink and mysql desynchronized

**URL:** <https://discourse.nodered.org/t/ttn-uplink-and-mysql-desynchronized/12243>\
**Category:** General\
**Created:** [14 June 2019 18:31 UTC](https://discourse.nodered.org/t/ttn-uplink-and-mysql-desynchronized/12243 "2019-06-14T18:31:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Imiau](https://avatars.discourse-cdn.com/v4/letter/i/5daacb/32.png) [@Imiau](https://discourse.nodered.org/u/Imiau)\
**Post date:** [14 June 2019 18:31 UTC](https://discourse.nodered.org/t/ttn-uplink-and-mysql-desynchronized/12243/1 "2019-06-14T18:31:04Z")

</div>

Hello,  
I'm listening for Uplink messages (each 2 minutes arrives 1) from a LoraWAN device and inserting the data to MYSQL Data Base, but I don't understand why but there is a desynchronization between the received data and the inserted data.  
If I'm reciving the message with the ID 70 with the ttn uplink node, the MYSQL node maybe inserting a previous message with ID 30.  
And if I disconnect the LoraWAN device from the Power, continues appearing data in the Data Base each 2 minutes until the data reaches the ID 70.  
If someone could help me to understand what is happening I would appreciate it.  
Thanks

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/07776f1c58edb9db96a239987e0783d84d8ae301.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 June 2019 21:03 UTC](https://discourse.nodered.org/t/ttn-uplink-and-mysql-desynchronized/12243/2 "2019-06-14T21:03:44Z")

</div>

Put debug nodes into the flow, give them names so it is easier to follow the output and then try again. By following the debug you should be able to work out what is going on. If you tick the box in the debug nodes to write to console then they will be written to the log which may make it easier to analyse what happened.

---

<div class="post-metadata">

**Author:** ![Imiau](https://avatars.discourse-cdn.com/v4/letter/i/5daacb/32.png) [@Imiau](https://discourse.nodered.org/u/Imiau)\
**Post date:** [5 July 2019 10:43 UTC](https://discourse.nodered.org/t/ttn-uplink-and-mysql-desynchronized/12243/3 "2019-07-05T10:43:56Z")

</div>

Thank you Colin for your answer, I always use the Debug nodes but I quit them for the photo, I don't know how I have solved it but it is done.
