GunicornRedis

Redis appendfsync blocking causes Gunicorn worker timeout

critical
performanceUpdated Jun 11, 2019(via Exa)
How to detect:

When Redis cache grows to several hundred MB and appendfsync is set to 'everysec', disk write operations can take over 1 second, blocking Gunicorn worker processes and triggering WORKER TIMEOUT errors, resulting in 502 errors to clients.

Recommended action:

Change Redis configuration from 'appendfsync everysec' to 'appendfsync no' to prevent blocking synchronous writes to disk. This allows Redis to write asynchronously without blocking Gunicorn workers.