I have a Web Server running on a devices under uhttpd.
I have N devices ( N could be 25 ) that send request to the main devices.
Everything works correctly when the main devices is running, but during a reboot and starting up it is slower.
I noticed that the during the boot of the main devices the "netstat -ant | grep ESTABLISHED | wc -l " gives my high number ( 40, 50 ..) and then after a few minutes this number drops to 4-7.
So I think that this could be the problem..?
My max_request on /etc/config/uhttpd is 20
I read Here that the requests are queued until the number drops below the limit.
How can I drop, reject or empty the queue until the system is ready to handles them?
This is hard to answer without knowing exactly how your process is implemented. Is it a CGI program talking to some daemon, or a Lua program embedded in uhttpd?
One approach to avoid the connection pile would be to make your application respond with a 503 HTTP error while your application is unable to serve requests. Right now it sounds to me as if you're accepting, but not answering incoming requests.