I’m having trouble with my n8n workflow on Docker. It’s a simple setup with a Webhook and a Write Binary File node. The workflow used to work fine but now it’s acting up.
Here’s what’s happening:
The API call triggers the workflow but it never finishes.
The n8n UI shows the execution as ‘running’ forever.
A file gets created but it’s corrupt and can’t be opened.
The logs show an error when moving the file from temp to the final location.
I’ve tried to fix it but no luck. Any ideas on how to troubleshoot this? I’m worried about starting from scratch because I’ve made several custom changes.
Hey Hazel, I’ve actually run into something similar with n8n before. One thing that helped me was checking the file system cache. Sometimes Docker can have issues with caching that lead to corrupted files.
Try clearing your Docker cache with ‘docker system prune’ (be careful, this removes unused data). Also, make sure your Docker volumes are set up correctly. I once had a problem where my volumes weren’t persisting data properly, causing weird file corruption.
Another thing to look at is your network setup. If there’s any instability in your connection, it could interrupt the file write process. Maybe try adding a ‘Wait’ node between your Webhook and Write Binary File nodes to give the system a bit more time to process.
If none of that works, you might want to consider running n8n outside of Docker temporarily to isolate if it’s a Docker-specific issue. It’s a pain, but it could help narrow down the problem. Good luck!
hey there, i’ve seen similar issues before. might be a permissions problem with your docker setup. try checking if n8n has write access to the target directory. also, double-check your docker logs for any file system errors. could give you some clues about whats going wrong. good luck troubleshooting!
I’ve dealt with similar issues in n8n before. Have you considered checking your disk space? Sometimes when the storage is full, it can cause weird behavior like this. Also, try increasing the execution timeout in your n8n settings. It might be that your workflow is just taking longer than expected to complete.
Another thing to look at is your network connectivity. If there’s any instability between your webhook and the file write operation, it could lead to incomplete or corrupted files. You might want to add some error handling or retry logic to your workflow to make it more resilient.
Lastly, consider backing up your workflow and then trying to recreate it step by step. Sometimes, there can be hidden issues that resolve themselves when you rebuild the workflow from scratch. It’s a bit of work, but it might save you time in the long run if you can’t pinpoint the exact problem.