Cannot connect to manager afte some time

I am using Asterisk 20, and I utilize the pyst2 library to connect to the Asterisk Manager. Initially, the connection works correctly, allowing me to send actions without issues. However, after some time, I encounter a timeout error and can no longer connect to the Manager. This problem arises when I am having multiple ongoing calls, and I need to connect from several instances. Once the Manager disconnects, I’m unable to reconnect until I stop the connections on all servers and restart them. Do you have any idea why this might be happening?

There is insufficient information to be able to say anything. What shows on the Asterisk console for the attempts? Can you telnet to the port? What does “timeout error” mean?

The more information and detail you provide, the more likely it is someone will and can answer.

there is no log in the asterisk CLI, and the Python library returns with timeout being unable to connect to the server. When I stop all calls and there is low traffic on the asterisk server I can connect to the Manager. telnet is also not connecting.