I'm running a series of server programs on Windows Server 2016 that are using a MySQL server (MariaDB 10.0.27). At first everything is fine, the servers connect to the database, clients can connect to the server programs, everything is within expectations. But after the programs have been running for a few hours I suddenly can't create any new connections to the MySQL server anymore. The server programs are still running, I can connect to them, and they appear to still be using the database server, but when I try to connect to the MySQL server myself I get the following error message:
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (10055 "Unknown error")
At first the error message said the following, but a search led me to increase the number of available TCP ports, as a lack of those was supposedly the cause for that error.
(HY000/2002): An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
MaxUserPort registry setting is now currently
51024. However, the problem didn't disappear, only the error message changed.
Now when I close the server programs I can create new connections again just fine, without changing anything about the continiously running MySQL server, and after I start them again I can also still create new connections for a while. I was thinking it might be a MySQL connection number restriction somehow, but that setting is currently at 1500 in my.ini and I don't see any errors in the MySQL console.
max_connections = 1500
Also, I noticed that once I can't create new connections anymore, I also can't open any websites in my browser, getting the error
ERR_CONNECTION_FAILED, which makes me think about that TCP port limit again. But when I run
netstat I see less than 300 connections, and it's my understanding that even with default settings this should be fine. I can also start a web server but I can't open anything on it via HTTP from the same machine. I can access the web server's content from the outside though.
I'm at a total loss of what's going on here. Does anyone have an idea?