I am facing this issue randomly with no reason sometimes it works great sometime it just happens and no matter if i create duplicate workflow or copy nodes to new one it doesn’t goes away:
Describe the issue/error/question
The workflow portion i have pasted below, you can see, it has 2 insert nodes which are inserting data properly, but after everything is done somehow it inserts same data again(as duplicate entry).
This is totally random sometimes twice and sometime thrice.
have tried various scenarios connecting and removing various nodes but I can’t understand the logic why it would happen.
I even enabled execute once on both mysql nodes still no use.
duplicates get created in the table.
After lot of hit and trial connection and disconnection it pinpointed the issue at http node, if i remove the http node one step before the previous workflow portion i shared, it works wonderfully, but of course http node is a must have.
Why would a http node trigger unwanted mysql query ?
If i disconnect the Http node and join the workflow directly to other mysql nodes it creates normal entry but no duplicate.
Hi @mayanktiwari, I am sorry to hear you’re having trouble. Tbh I can’t see how the HTTP Request node would cause the behaviour you have reported but perhaps I am missing something here. I tried reproducing your problem using the below docker compose setup:
I have then executed the below workflow based on your description with an added HTTP Request node against two dummy tables:
However, both tables included only a single row as expected after doing so.
Perhaps you can share the smallest possible workflow using which this problem can be reproduced with a simplified MySQL database structure and no additional dependencies?
Hi @MutedJam
Thank you for putting effort,
actually the issue is that i am also not sure what has caused this, i shared a screencast video link also in which you can see the issue.
This is happening only sometimes, i have 10-20 workflows but only in 2 of them i faced this issue.
I checked n8n logs also there also everything is in order and matching with what happens on UI.
But still this issue occurs in some case.
we are using PM2 to run n8n.
Have set up a new instance of latest n8n to see if there is some issue in current version only.
i also tried to reproduce even using exact http request which i am using for original node and not getting the issue.
The nodes in use in overall workflow are
mysql
function
http
redis
if
set
merge
start
noop
there is no other node is used.
This is the strangest issue i have faced ever, I have no idea how to reproduce it’s just happening and overall not making any sense to me. I even checked if there may be some hidden function or trigger implemented in the mysql but none is there.
@MutedJam we found out the issue and it was neither in n8n, or any of other elements like mysql, nginx etc.
It was another workflow which was updating the data from another webhook trigger,
as soon as the entry was getting created in hubspot it would trigger the webhook which in turn would trigger another workflow. we had to do a lot of trials to find out the issue exactly.
It was completely on our end.
Thank you for trying out and testing in order to help out.