Rbillon59 / hass-n8n

Home assistant addon to host a n8n.io instance
Apache License 2.0
44 stars 15 forks source link

Increase Max Payload #37

Closed BenJamesAndo closed 1 year ago

BenJamesAndo commented 1 year ago

n8n by default seems to only allow files of 16MB or smaller to be processed. As per the recent update where the /backup folder is recognised I'd like to be able to process some files that are larger than 16MB, as are most backup files.

Is it possible to add an addon configuration to increase the max size? e.g. 2048MB. The variable is N8N_PAYLOAD_SIZE_MAX as per n8n environment variables reference guide

Rbillon59 commented 1 year ago

Hi @BenJamesAndo !

What is your use case here ? I tried to upload a backup file (190MB) to a FTP using n8n and it was successful. image

Also, keep in mind, if working with binary data, they will be loaded in JVM, so you need as more heap size as the file size

BenJamesAndo commented 1 year ago

Hi @Rbillon59 I probably need to learn n8n better. Because I can't figure out how to upload to FTP without first using a 'Read Binary Files' node. If I do it straight from a local file trigger to FTP it uploads a file with the same name, but it's much smaller. I think the file it creates is just a file with the 'path' as the contents, rather than the actual contents of the file.

image image

If I do use a binary file node then I get the max payload error.

Rbillon59 commented 1 year ago

Thank you for your explanation. You're totally right and I was wrong. You've not to learn how to use n8n, I have haha.

I will think about the implementation. You're not the first to ask for a way to change an env var. Maybe I can create an array of key value pairs to pass to the configuration so any env var could be changed in the configuration without having to create a new release of the addon each time.

I'll keep you up

BenJamesAndo commented 1 year ago

Hey that sounds like a cool idea! Because I was actually thinking having control over the WEBHOOK_TUNNEL_URL & EXECUTIONS_PROCESS env variable would be good. Would actually be really nice if all HA addons allowed for complete control over env variables. Hopefully you figure out a way to pull it off.

Rbillon59 commented 1 year ago

Could you please update the addon and try what you want ? Let me know if you face any issue.

Thanks

BenJamesAndo commented 1 year ago

I've tested a bunch of variables and they work great. Thanks! It's a very nice implementation of the feature.

Rbillon59 commented 1 year ago

Awesome ! Closing the issue, enjoy !