I’m running n8n inside a docker container, which is inside CapRovers master container on a Digital Ocean droplet. Inside Caprover I created a “one-click-install-app” and with that n8n comes standard with a Postgres database.
My problem is that I can’t find a way to set up a workflow to automaticly remove any log rows inside the database. What I haven’t tried is set any environment variables which will automaticly prune the data. I’m to scared any data will be lost, what shouldn’t be lost.
@harshil1712 Yea, I feel what you mean indeed. But, for me, as a newby in the docker environment it is a good to go solution.
Well, in like 3 months, I noticed around 77000 excecutions were listed inside the “excecution list”, inside the workflow app. I deleted them, but the database is still 96GB. So, I think that the logs are still there, not deleted? I can’t imagine 1 workflow (with now litterly 1 excecution listed) is 96GB.
If the data got deleted, space should be available. I am not too sure what is going here. Did you try restarting n8n after deleting the logs? Also, you can set up the environment variables mentioned in our documentation to allow n8n to automatically delete the data based on the time you specify.
I am not sure if this can be related to n8n itself as we don’t keep this many logs and logs to n8n were introduced recently and also are turned off by default.
I guess you’re sort of in the right direction. I have deleted the executions and it looks like Postgres is keeping the rows in the database. Could this be an improvement for n8n too?
But, after doing some research with adminer.php and other tools I found out that the actual data is being mounted in my Digital Ocean droplet. So, before i’m able to do any Vacuum operation, I will need to find the actual data first lol.
I’m thinking of deleting the complete app and just create a new one, because I only have one workflow which I can copy easily.
Hum, that is interesting. You should be seeing n8n tables in there, yes.
In any case, the vacuum operation is “global” so if you click the SQL Command link in the left panel you should be able to run it just fine and see if it worked.
Ok, this is strange. If you check other databases, are all of them also empty? Because this might indicate that the connection is being done to another postgres instance that is not the one being used by n8n.