Sounds a lot like a concurrency issue - possibly not flushing the request, or the request is being processed / timing out from another go routine. I would start by adding some lifecycle request traces and processing these in an automated fashion - almost the only way to debug highly concurrent issues.
Also, did you try running the server with “race detection” turned on - this might be your best and easiest bet. > On Jan 22, 2019, at 9:52 AM, Tom Cook <tom.k.c...@gmail.com> wrote: > > I have a moderately complex HTTP server written using net/http HandlerFuncs. > Testing one request at a time all is well, but when I start putting > significant load on it, it sometimes returns empty packets, ie no HTTP > response headers, no status code, nothing. The clients are all written using > Python requests and report BadstatusLine(""). > > I don't have a straightforward way of reproducing this without all the > relevant software (and indeed hardware) being configured, and it's still > possible that there is some code path through my code that ends without > writing anything into the HttpResponse, though I have spent quite a few hours > reviewing the code for this possibility and can't see how it would happen. > > Does anyone know if there are conditions where the net/http server can do > this? The load during system startup might be considered high, but it's > maybe ten requests per second high, not thousands, though the hardware is > relatively limited (think RPi2 and you're not too far wrong). I'm using a > custom mux, but it's a copy-and-paste of net/http.ServeMux with some extra > logging added. > > Thanks for any help, > Tom > > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com > <mailto:golang-nuts+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.