I am trying to use the Mini-HTTP-Server on Asterisk 18.5.1 to connect WebRTC phones (around 300 hundred) but it is crashing randomly.
I just change the domain in the screenshot for security. It works sometimes, but suddenly, the mini-HTTP server starts showing this error when accessing the links below.
make sure that you are NOT hosting any other files, scripts or html in the http server, and switch off static… you don’t want to give Asterisk anything else to work on that it doesn’t absolutely need to. (Like this you should only really be able to get to httpstatus and /ws, but the /ws will not work directly in a web browser, and should respond with a protocol error.)
Turn off http protocol, and only make it accessible via https (tls), and while you are there, give it an obscure port number - something greater than 1024, especially if your server is exposed to the world wide web. (You may have had a dos attack.)
Now that your web service is protected, give it a limit that works for you. There is a connection limit, by default of 100.
If this is exhausting Asterisk, then it will be time to consider scaling out - to doo that, just add a load balancer before your Asterisk array, to distribute the connections.