Docker container crashes on large HTTP file upload

Hey! I’m trying to upload a large-ish video file (7PM) to the Mastodon.social API:

I verified that the HTTP Post for uploading media works with images, but when uploading larger files n8n crashes almost instantly:

{"level":"debug","message":"Executing hook on node \"Download video\" (hookFunctionsPush)","metadata":{"executionId":"62188","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteAfter","sessionId":"seitcumdui","timestamp":"2023-05-17T06:00:49.735Z","workflowId":"59"}}
{"level":"debug","message":"Send data of type \"nodeExecuteAfter\" to editor-UI","metadata":{"dataType":"nodeExecuteAfter","file":"abstract.push.js","function":"send","sessionId":"seitcumdui","timestamp":"2023-05-17T06:00:49.735Z"}}
{"level":"debug","message":"Executing hook on node \"MSTDN Upload media\" (hookFunctionsPush)","metadata":{"executionId":"62188","file":"WorkflowExecuteAdditionalData.js","function":"nodeExecuteBefore","sessionId":"seitcumdui","timestamp":"2023-05-17T06:00:50.035Z","workflowId":"59"}}
{"level":"debug","message":"Send data of type \"nodeExecuteBefore\" to editor-UI","metadata":{"dataType":"nodeExecuteBefore","file":"abstract.push.js","function":"send","sessionId":"seitcumdui","timestamp":"2023-05-17T06:00:50.036Z"}}
{"level":"debug","message":"Proxying request to axios","metadata":{"file":"NodeExecuteFunctions.js","function":"proxyRequestToAxios","timestamp":"2023-05-17T06:00:51.799Z"}}
{"level":"error","message":"Last session crashed","metadata":{"file":"CrashJournal.js","function":"init","timestamp":"2023-05-17T06:00:58.960Z"}}

logs/crash.journal is empty, so I’m unsure how to proceed with finding the issue here. Any thoughts on what’s happening?

The only thing I can think of is that according to the Mastodon API documentation, video formats are processes asynchronously and will return a 202 response instead of a 200. Perhaps the HTTP node can’t handle that?

Anyone? I’d really like to get this solved :slight_smile:

Hey @bartv,

I must have missed this one, What size file are you using and is there more to the log when it crashes that looks like a lot is missing.

Have you tried posting the file to another service using the HTTP Request node as well just to see if that works? You could also try setting N8N_DEFAULT_BINARY_DATA_MODE to filesystem to see if that helps.

1 Like

Changing the N8N_DEFAULT_BINARY_DATA_MODE fixed it, thanks!

1 Like