Search code examples
javananohttpd

NanoHttpd seems to stop responding to individual clients after some requests


Using nanohttpd, I have created a webpage that has buttons on it, when the buttons are clicked I make a ajax get call to nanohttpd with a different URI.

The different buttons on the screen send different values for the parms.

But it seems like I am only able to send 6 ajax calls before the server stops seeing the requests and I need to reload the page.

I thought it maybe to do with caching, but the same thing happens even when I pass a random number as parm and as part of the URI.

I see this same behavior on my phone as I do with my PC.

Looking at the developer tools in Chrome, I can see the requests being sent out, but they remaining are pending (while the first 6 returned instantly)

Does anyone know am I running into some form of limit or if i need to kill any connections etc?

Thanks


Solution

  • As I mentions in the comment above I hit that concurrent ajax limit

    I did not need any response from the server so I was responding with a new Response("")

    once i started responding with some content the issue was fixed