Over a thousand clients connected to Azerbaijan03?
I think this is the cause for this server crashing so often. But what does this statistic even mean? I’ve been trying to find a way to limit the number of connected peers, to give the server some relief, but so far have not solved it.
For testing, I’m setting this server to private mode temporarily, and will see if the clients stop connecting.
Update: I just turned off Robinson Private mode and returned to Peer-to-Peer mode and the number of clients connected popped back up. But even in Robinson mode, the Azerbaijan server had a few hundred connections at all times, much more than most yacy peers. I am studying the server logs and have placed it back to Robinson mode.
Mystery solved…
I found an old cron job on the server that was restarting the Yacy server automatically. It’s something we set up months ago because the server seemed to be getting slammed with queries and crashing the server. But the cron job called a shell script that was no longer valid (because the IP address changed) and so the Yacy server was being automatically restarted every five minutes!
So this problem was not Yacy’s fault, but a problem with our server setup. I have fixed the cron job and the shell script it invoked, which is no longer restarting the server. And it has resumed participation in the peer-to-peer network. The problem seems to have gone away.
If the server gets slammed again with query requests from a bad actor, I would probably resort to blocking the originating IP address.
I apologize if Azerbaijan03 has caused any trouble with the Yacy network. Every time Yacy restarted, it had to reconnect to the seeds and peers, causing a spike in peer connections. I’m sorry for that… It appears to be fixed now, and Azerbaijan03 is crawling, sharing results with peers, and available for service.