Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

"out of connection slots" #9

Closed
hulkholden opened this Issue · 2 comments

2 participants

@hulkholden

I've been trying to find a good solution to this issue, but I'm not sure of the best approach to take.

I'm setting up my server with config.connection_max = 4. I started seeing problems when the page I serve has 5 links to local resources (bootstrap css+js, jquery js, and a .css and .js for my page). Chrome quite happily opens 5 connections to get these resources, webby saturates to max_connections, and never responds to the 5th request. Or anything else other than further requests on the open connections.

It seems that Chrome and Firefox will open up to 15 connections to the same host (https://code.google.com/p/chromium/issues/detail?id=12066 - might be outdated). So I could set config.max_connections to 15 or so, which is an easy workaround, but seems like overkill.

I could add Connection:close to all my responses to avoid keep-alive, but that's a bit sub-optimal too.

One approach I started looking into was to reset open (but idle) connections iff wb_on_incoming errors with "out of connection slots", and loop. That's quite a fiddly patch though, so I thought I'd check what you thought about that approach before taking it further.

Of course there might be a much simpler solution that my tired brain is missing :)

@deplinenoise
@hulkholden

Thanks. I thought about this a bit more, and came to the conclusion that I'm happy just bumping up the number of connections :)

It's interesting to hear that you have a separate framework for hosting the tools, and that the game just serves state. At Media Molecule we always used to serve everything from the game instance, but then we didn't have that much static content. I like the idea of having a centralised framework that can connect to multiple targets though - I can imagine some cool applications like driving a small fleet of targets for automated testing, logging results to a DB or whatever.

@hulkholden hulkholden closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.