There was issue where the execution logs were not getting saved and found a solution to add env variables :
EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_MAX_AGE=1440.
Once this was added and started the App service in Azure, the execution that were older than 2 months didn’t get deleted, also the instance is going down and the workflow running status is unknown.
There were around 1254641 execution logs
Thank you @Jon for your response. n8n is running as a web app in docker container. How can I resolve this issue? Also will there be any conflict with execution_entity table in postgresDB, should that be cleared and keep data that are of last 60 days?
I guess the first thing to do would be to make sure that the option is being set. I would stop the container then start it rather than a restart to see if that helps, I am not sure if azure containers do anything odd unless you are just running docker in an azure VPS.
It may be worth checking the database as well to see what the oldest record is. There shouldn’t be any conflicts, when the container starts check the docker output to see if there are any errors.
So that looks like you are hitting a memory limit, it could be while deleting old records or it could be from a workflow that is working with a lot of data.
When an instance does crash like that it will lead to workflows having an unknown status. If the deletion has not been done before I would manually do the first one as you are on Postgres so it shouldn’t be that bad and I would also recommend upgrading as we fixed how the delete query works in maybe 217 or around there.
Hey @Jon ,
Are you suggesting to delete all the execution logs manually? And I forgot to mention that even though executions are around 1200k, in the entity_executions table I see just 14000 entries.
And previously upgrading was done to 0.210 version, but the JavaScript written in Code node was showing errors, because some inbuilt functions which were used earlier in version 0.205 was removed and not allowed to use and this resulted in a conflict. So we didn’t update any further after 0.205