Youtube Node Request failed with status code 413

i tried yesterday something similar to this after that one or three times video was uploading (only if delete current execution data), after that something unexpected happened. in my host, i am only having 20 GB Disk space before the used space was 8.9 GB yesterday after changing this setting ( i don’t know it worked or not but video was not uploading ) my diskspace became 19.5 GB. an you explain why this is happening ? , and now i restored my backup and it became 8.5 GB as it was before

can you please explain this ?

  1. if i open a command nod in n8n and execute this command will it work ?

3.if i change the memory will it became a diskspace loss ?

  1. how to know this method is working or not because i am afraid try to upload videos from yesterday
  1. if i open a command nod in n8n and execute this command will it work ?

No. The example commands provided will start n8n using the environment variable, they aren’t mean to be used in the Execute Command node.

3.if i change the memory will it became a diskspace loss ?

n8n will persist execution data in a database which is stored on your hard drive by default. Running workflows processing large amounts of data will cause disk space to be used for this reason. The setting N8N_PAYLOAD_SIZE_MAX itself will have no direct impact on the disk space. Check out Execution data - n8n Documentation for more details on how to enable data pruning in n8n.

  1. how to know this method is working or not because i am afraid try to upload videos from yesterday

You can read any environment variable through an expression such as {{ $env["N8N_PAYLOAD_SIZE_MAX"] }}. Running the below workflow in an n8n instance started using N8N_PAYLOAD_SIZE_MAX=512 npx n8n@latest should return a value of 512:

Just keep in mind that the exact way of setting environment variables will depend on how you have deployed n8n. So far it is not clear to me how that’s happening.

Now This is what i am getting. before i am going to execute one more thing that is where should i run this command as a user or as root and is this the proper command i shown below ?

N8N_PAYLOAD_SIZE_MAX=512 npx [email protected]

Here i am assuming that @latest equals @n8n version
is this correct ?

The command looks fine (though it’s just one of many possible ways to run n8n), though it would start n8n on the local machine it is entered on, listening at http://localhost:5678.

How exactly did you deploy on console.opendream.in?

i installed by following How to set up n8n via PM2 – n8n Blog
also using ngnix

Have you tried using the command from the environment variable section of blog post on your server? So something like N8N_BASIC_AUTH_ACTIVE=true N8N_BASIC_AUTH_USER=<USERNAME> N8N_BASIC_AUTH_PASSWORD=<PASSWORD> N8N_PAYLOAD_SIZE_MAX=512 pm2 restart n8n --update-env (or the configuration file version just below)?

in blog post there is ony

N8N_BASIC_AUTH_ACTIVE=true N8N_BASIC_AUTH_USER=<USERNAME> N8N_BASIC_AUTH_PASSWORD=<PASSWORD> pm2 restart n8n --update-env

so now what should i do

1.go with N8N_PAYLOAD_SIZE_MAX=512 npx [email protected]

2.try editing env file ( i am not sure the location of env file if i should try this i am expecting a little help )

in blog post there is ony

You’d simply add any additional environment variables to the command, like in the example I have posted:

N8N_BASIC_AUTH_ACTIVE=true N8N_BASIC_AUTH_USER=<USERNAME> N8N_BASIC_AUTH_PASSWORD=<PASSWORD> N8N_PAYLOAD_SIZE_MAX=512 pm2 restart n8n --update-env

If you decide to go with a configuration file instead the exact file location would depend on where you have created the file.

-bash: pm2: command not found

That sounds like you’re not using pm2 then or would need to specify an absolute path to the respective binary and is unrelated to the actual problem.

So before continuing here you’d need to find out exactly how n8n runs on your webserver. What do you usually do when updating n8n? How exactly do you pull and start the latest version?

if i use npx command it is working i guess

this is what happening now

Untitled

This would be pm2 telling you it isn’t aware of a running process named n8n, suggesting n8n isn’t managed by pm2 on your machine.

should i install pm2 or keep it as it is ?

I think in a first step you should find out how n8n actually runs on your server. What do you usually do when updating n8n? How exactly do you pull and start the latest version? Were you the one originally setting up your server?

instead of pm2 i am able to do with npx
every commands like this

log

20010 info lifecycle [email protected]~preinstall: [email protected]
20011 silly preinstall [email protected]
20012 info lifecycle [email protected]~preinstall: [email protected]
20013 silly preinstall [email protected]
20014 info lifecycle [email protected]~preinstall: [email protected]
20015 silly preinstall [email protected]
20016 info lifecycle [email protected]~preinstall: [email protected]
20017 silly preinstall [email protected]
20018 info lifecycle [email protected]~preinstall: [email protected]
20019 silly preinstall [email protected]
20020 info lifecycle [email protected]~preinstall: [email protected]
20021 silly preinstall [email protected]
20022 info lifecycle [email protected]~preinstall: [email protected]
20023 silly preinstall [email protected]
20024 info lifecycle a[email protected]~preinstall: [email protected]
20025 silly preinstall [email protected]
20026 info lifecycle [email protected]~preinstall: [email protected]
20027 silly preinstall [email protected]
20028 info lifecycle [email protected]~preinstall: [email protected]
20029 silly preinstall [email protected]
20030 info lifecycle [email protected]~preinstall: [email protected]
20031 silly preinstall @azure/[email protected]
20032 info lifecycle @azure/[email protected]~preinstall: @azure/[email protected]
20033 silly preinstall @azure/[email protected]
20034 info lifecycle @azure/[email protected]~preinstall: @azure/[email protected]
20035 silly preinstall @azure/[email protected]
20036 info lifecycle @azure/[email protected]~preinstall: @azure/[email protected]
20037 silly preinstall @azure/[email protected]
20038 info lifecycle @azure/[email protected]~preinstall: @azure/[email protected]
                                                                                                      1,

And are you 100% sure your instance started via npx is the n8n instance listening on https://console.opendream.in/? It’d be a very unusual server setup and means that your n8n instance stops working whenever you cancel the npx command.

From your previous posts you seem to be using pm2, but I am having a really hard time understanding what’s going on your server. For example, from looking at Can i run my domain like a normal website like a WordPress website in domain.com if i am running n8n.domain.com using docker? - #19 by jaisonkerala1 it seems you’re using pm2 as the user jaison, not as the user root like in your posts in the current thread.

The previous thread also suggests you’re using an ecosystem file (in the home directory) which you’d need to update rather than specifying the environment variables as part of your command.

The npm install command most likely fails because you are using an outdated version of Node.js, so you would need to install the current LTS version 16 of Node.js before installing a new version of n8n using npm.

But again, there are a lot of things being mixed up here and you probably want to take it one step at a time.

last time i installed using pm2 after messing with docker, but i installed under user jaison
i used to disable apache and enabling ngnix while rebooting server otherwise n8n will not start
otherwise its working fine, as i told i have done a server backup
restore today

So if you are currently using pm2 and the configuration from the last post you probably need to update your ecosystem.config.js file so it includes the new N8N_PAYLOAD_SIZE_MAX variable.

Then restart the n8n process using pm2 restart ecosystem.config.js or pm2 restart ecosystem.config.js --update-env (not sure if the --update-env part is needed, so this might be worth checking).

Make sure to run the pm2 command as the pm2 user (jaison) and in the directory where the ecosystem.config.js file for n8n lives.

are you having any paid service to reinstall properly

We don’t offer this ourselves, but there are several n8n experts out there who can assist with setting up a webserver running n8n. You can fill out the Find an n8n expert form on our website or leave a post in the Jobs category here on the forum to connect with a suitable expert.

1 Like