Query is slow [docker]

Recently over the last couple of weeks, I’ve been getting n8n docker dying and my automation restarting it again.

And I’ve seen a number of “Query is slow” errors in the logs and a number of UI’s just freezing when executing a flow.

Any ideas on what I need to do to start troubleshooting this?

Hey @RedPacketSec, I am sorry to hear you are having trouble here. “Query is slow” refers to the duration of database queries. It’s merely an indicator, but not an error as such. It can be configured via the DB_LOGGING_MAX_EXECUTION_TIME variable.

If you encounter frequent slow queries you might want to consider cleaning up your database as described here in the docs: Execution data - n8n Documentation (and if you’re using SQLite also the part from the Keep in mind box).

This can take a very long time if you’re doing this for the first time (here’s a first hand report from @mcnaveen on this). So you’d typically want to do this outside your core business hours.

3 Likes

on it, cheers