Message "AOF fsync is taking too long" being printed in Redis log
search cancel

Message "AOF fsync is taking too long" being printed in Redis log

book

Article ID: 295131

calendar_today

Updated On:

Products

Redis for VMware Tanzu

Issue/Introduction

When monitoring your Redis logs, there are a lot of these messages:


2106:M 09 Nov 13:58:47.082 * Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis.


Another symptom is that that Redis is also slow to respond. 

Your server is configured to use AOF (Append Only File). For more details on Redis persistence model please see the following Redis documentation: Redis Persistence.

By using AOF, you can keep data loss to a minimum. When the fsync of the AOF file takes too long, Redis will slow down to ensure all data is persistent (no loss).


Resolution

The Redis log, Asynchronous AOF fsync, taking too long indicates one of two likely causes:

  1. You are writing a lot of data in a short amount of time.
  2. The underlying hardware is slow to write to disk.


The Redis timeout is a side affect of Redis slowing down to make sure the data is persisted to disk during the fsync.


It is a trade off of consistency over availability when the app is writing large amounts of data to the Redis instance over a short time.


Here are options to address this issue:

  • Upgrade hardware for faster writing.
  • Turn off AOF. 
Note: If you are using Redis for Tanzu Application Service (TAS) on demand service, AOF is disabled by default.