Hello,
I'm using redis 3.2.1:
redis-server -v
Redis server v=3.2.1 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=8ab9de078b62748e
on Linux:
uname -a
Linux amee 4.10.0-21-generic #23-Ubuntu SMP Fri Apr 28 16:14:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
The AOF file has 12G, but we started a big pipe this morning. It looks like the pipe size/chunck is larger than the amount of data that can be written, but it keeps trying in a loop. The machine has 128G RAM and 280G free disk space. Filesystem is ext4 with 97% free inodes on a SSD.
24797:M 20 Jun 10:55:02.332 # Short write while writing to the AOF file: (nwritten=2147479552, expected=2537295275)
24797:M 20 Jun 10:55:35.533 # Short write while writing to the AOF file: (nwritten=2147479552, expected=2537295275)
24797:M 20 Jun 10:56:06.859 # Short write while writing to the AOF file: (nwritten=2147479552, expected=2537295275)
24797:M 20 Jun 10:56:38.027 # Short write while writing to the AOF file: (nwritten=2147479552, expected=2537295275)
This problem blocks all future operations on redis. The nwritten is very close to INT_MAX. The return value of write is a ssize_t, and the expected size is larger than both. In this case, Redis keeps trying to write to AOF, indefinetely.
The call can be seen here: https://github.com/antirez/redis/blob/3.2/src/aof.c#L185
Comment From: yoav-steinberg
Seems to be fixed in #4498 Closing.
Comment From: Macbeth-byx
Hello : I'm using redis 3.2.12 version by doccker(19.0 verison) container on Linux the redis role : one master and three slave, total 4 node
Slave node's redis container are exit with exception,slave node redis log are as follows: Short write while writing to the AOF file: (nwritten=697,expected=3367) Can't recover from AOF write error when the AOF fsync policy is 'always ' . Exiting...
How to resolve the problem?