In the package.json, i have
"n8n": "dotenv cross-env N8N_ENCRYPTION_KEY=%N8N_ENCRYPTION_KEY% && cross-env EXECUTIONS_DATA_PRUNE=true && cross-env EXECUTIONS_DATA_MAX_AGE=168 && cross-env N8N_USER_MANAGEMENT_DISABLED=true && cross-env N8N_METRICS=true && n8n start",
But it seems EXECUTIONS_DATA_PRUNE is not having any effect: after a months of running, I see 20K workflows executions and 1Gb database.
PS: as a secondary question: sometimes I get “EBUSY: resource busy” error on start. Several restarts helps, but it would be nice to fix it as well.
I use n8n v 0.209.4 on Windows 10 VDS.
Actually, funny thing, i cant clear executions via the website: it just hangs forever.
If to reload the website, it shows 0 executions. But if to restart n8n and reload the website, i see 20k executions again.
March 30, 2023, 7:18pm
Can you share a bit more on how you running n8n? I don’t recognise what you are doing, like what are you doing with dotenv and why the package.json?
So, i have a couple of VDS’es i utilize, so i’ve made this project to sync the local changes with VDS:
[n8n-workbench-syncer] Syncing local n8n workflows with remote host - #4 by yavetal
Dotenv reads the encryption key from the .env, and cross-env just pushes other env values, e.g. EXECUTIONS_DATA_PRUNE=true (well, at least it supposed to do so). And package.json is used in order to keep other syncing and running scripts in one place.
Here’s full package.json: n8n-workbench-syncer/package.json at main · Systemify-me/n8n-workbench-syncer · GitHub
March 31, 2023, 11:47am
Have any of the environment options set? It kind of feels like the issue could be with the startup command being used, I would be tempted to just a config file for all the options and pass that in as an option instead and see if that helps.
Yeah, sounds like a workaround, thanks!
The issue is super easy to reproduce, if anyone is up to: just grab that package.json (
n8n-workbench-syncer/package.json at main · Systemify-me/n8n-workbench-syncer · GitHub ), throw it to the empty folder, and run:
npm i (might take a couple of minutes)
npm run n8n
Actually, I just did that on fresh system - and when i open browser with n8n, i see login and password requirement. That means n8n had missed
02:58PM - 02 Jun 16 UTC
01:20AM - 11 Jun 16 UTC
I don't get the test code. It uses an array to test multiple arguments.
… n using `cross-env` from within `package.json` how do I specify multiple args?
`cross-env NODE_ENV=production SERVER_ENV=staging`
but it dies not set any of the variables.
And here’s the answer:
With bash, &&
totally isolates one script from another, socross-env
can't spawn the rest of your command because it's isolated from it.
Ahh, this is so stupid. i shouldn’t even had to create this thread.
But in case someone else is stuck with similar issue, here’s proper command - I don’t see login prompt when running n8n via:
"n8n": "dotenv cross-env N8N_ENCRYPTION_KEY=%N8N_ENCRYPTION_KEY% EXECUTIONS_DATA_PRUNE=true EXECUTIONS_DATA_MAX_AGE=168 N8N_USER_MANAGEMENT_DISABLED=true N8N_METRICS=true n8n start",
(I’ll update my workbench today later on)
March 31, 2023, 3:15pm
Ah nice to see you cracked it
April 7, 2023, 3:16pm
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.