the service unavailable when aof rewrite i must restart redis , why and how avoid it.

server
Mem : 15G 
CPU: 4
version: 
docker version: 19.03.15
redis version: 6.0.10
config:
appendonly: yes
appendfsync: everysec
no-appendfsync-on-rewrite:no
memory used:
used_memory:8604401032
used_memory_human:8.01G
used_memory_rss:8831893504
used_memory_rss_human:8.23G

the aof log

1:M 07 Aug 2021 15:32:55.738 * Starting automatic rewriting of AOF on 100% growth
1:M 07 Aug 2021 15:32:55.757 * Background append only file rewriting started by pid 186
1:M 07 Aug 2021 15:36:38.658 # Background AOF rewrite terminated by signal 9
1:M 07 Aug 2021 15:36:38.831 * Starting automatic rewriting of AOF on 100% growth
1:M 07 Aug 2021 15:36:38.904 * Background append only file rewriting started by pid 187
1:signal-handler (1628350622) Received SIGTERM scheduling shutdown...
1:M 07 Aug 2021 15:37:02.720 # User requested shutdown...
1:M 07 Aug 2021 15:37:02.720 # There is a child rewriting the AOF. Killing it!

jedis error:

 Could not get a resource from the pool

Comment From: oranagra

i'm not entirely sure what's the complaint here. is it that redis refuse writes during that time? or is completely unreachable? can you show the response of PING command during that time, or include full INFO all? specifically these fields: aof_last_bgrewrite_status, aof_last_write_status, aof_pending_bio_fsync, aof_delayed_fsync

if the disk is relatively fast, it makes sense that the AORFRW child is at 100% CPU.. it has a task to complete, so if it's not IO bound, it'll be CPU bound.