Asterisk AMI Unable to Connect

The asterisk is unable to connect to AMI. After restarting, it works fine, but after some time, it cannot reconnect to AMI again. The same issue occurs at least once a day.

What is connecting to AMI? What actually happens? Are you able to connect manually using something like telnet at the time? Is Asterisk working? Is there any console output?

We need a lot more information to be able to answer, really.

Yes, the asterisk is working fine, but it is unable to connect to the AMI, as shown in the figure (fig 1).
After restarting the Asterisk, the Asterisk is now able to connect to AMI, as shown in the figure (fig 2).

After sometime, asterisk unable to connect AMI. It needs to restart asterisk again, to connect AMI

What version of Asterisk?

Asterisk certified/16.8-cert3

That is not a current supported version of Asterisk. Additionally unless you are a support agreement customer then certified will not receive any fixes or changes if an issue is uncovered.