Fail2ban takes a long time to reboot

Hello. After upgrading to Debian 13, I started having issues with fail2ban freezing. Specifically, it kept stopping and restarting.

Through diagnostics and experimentation, I discovered that the panel is taking a very long time to remove addresses from the ban.

 758084 ?        S      0:00 sh -c -- /usr/bin/sudo /usr/local/hestia/bin/v-delete-firewall-ban '69.215.223.86' 'RECIDIVE'
 758085 ?        S      0:00 /usr/bin/sudo /usr/local/hestia/bin/v-delete-firewall-ban 69.215.223.86 RECIDIVE
 758087 ?        S      0:00 /bin/bash /usr/local/hestia/bin/v-delete-firewall-ban 69.215.223.86 RECIDIVE
 758110 ?        S      0:00 /bin/bash /usr/local/hestia/bin/v-delete-firewall-ban 69.215.223.86 RECIDIVE
 762184 ?        Ss     0:00 /bin/sh -c /usr/local/hestia/bin/v-delete-firewall-ban 73.67.91.51 RECIDIVE
 762185 ?        S      0:00 /bin/bash /usr/local/hestia/bin/v-delete-firewall-ban 73.67.91.51 RECIDIVE
 762208 ?        S      0:00 /bin/bash /usr/local/hestia/bin/v-delete-firewall-ban 73.67.91.51 RECIDIVE

I found this out by deleting the addresses on the “/list/firewall/banlist/” page. Manual deletion.

What should I do? How can I resolve this issue? It’s the same story on all the servers I’ve updated to…

I managed to speed up fail2ban by running the command:

for ip in $(fail2ban-client status recidive | sed -n ‘s/.Banned IP list:[[:space:]]//p’); do
fail2ban-client set recidive unbanip “$ip”
done

But I don’t understand the reason for this behavior.