#The interface is slow and lagging. What can I do?

1 messages · Page 1 of 1 (latest)

turbid sand
#

I am running this on my self-hosted NAS (SSD installed, 6-core CPU, 16 GB RAM) using Docker. PostgreSQL runs in a separate container, also on SSD. Even with 4 GB RAM allocated, there is a noticeable delay when listing 518 users, and even simple actions like renaming take 4–5 seconds. What could be causing this issue?

median ravineBOT
#
Searched self-hosting Docker performance optimization
#
Searched PostgreSQL configuration performance slow
#
#

Based on the documentation, here are several things to investigate:

1. Make sure Redis is configured and running

Twenty requires Redis cache for performance. Since v0.30, this is mandatory. Without it, every request hits the database directly, which would explain the slowness you're seeing. Verify you have a Redis container running and that your environment variables include:

REDIS_URL=redis://your-redis-host:6379

If you recently upgraded, the REDIS_URL variable replaced the older REDIS_HOST/REDIS_PORT variables as of v0.32.

2. Flush the cache

If Redis is running but the cache is stale or out of sync (especially after an upgrade), run this inside your twenty-server container:

yarn command:prod cache:flush

The v0.60 upgrade notes specifically mention that the caching strategy was refactored to prioritize cache hits over database queries, and flushing may be needed after upgrading.

3. Make sure the worker service is running

Twenty uses a separate worker process for background tasks. If it's not running, some operations may block or queue up. Verify you have the twenty-worker container running alongside twenty-server.

4. Check your Twenty version

If you're on an older version, upgrading to v0.60+ would give you the performance enhancements to the metadata API that were specifically designed to improve operations like listing and manipulating records.

5. NAS-specific considerations

The documentation lists a minimum of 2 GB RAM for Docker, so 4 GB should be sufficient. However, NAS devices often have lower single-thread CPU performance compared to standard servers, which can affect Node.js workloads. The documentation doesn't cover NAS-specific tuning, but the items above (especially Redis caching) are the most likely culprits for the delays you're describing.

Try this:

  1. Confirm Redis is running: docker ps | grep redis
  2. Flush the cache if it is
  3. Verify the worker is up