Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pool configuration could be an api call (rather than set in layer XML) #863

Open
artemp opened this issue Oct 11, 2011 · 3 comments
Open

Comments

@artemp
Copy link
Member

artemp commented Oct 11, 2011

After the bugfix as part of #855, it is now possible for servers that use more than 10 rendering threads to max out the default max_size of 10 for the postgres pool, leading to undefined behavior.

So, even after this is fixed (#862), it would still be more ideal for the calling application to be able to set the pool max_size, because this is actually a global setting and only the calling application that knows the # of potential threads that may operate concurrently (not the stylesheet author).

@springmeyer
Copy link
Member

if we move on this, then this hardcoded default should likely be surfaced in tilemill: https://github.com/mapbox/tilemill/blob/master/commands/export.bones#L206-L211

@strk
Copy link
Contributor

strk commented Jan 31, 2013

Agreed that a direct API to the pooler would be useful. For example someone might want to drop all unused connections periodically, or at a given point in time. At least, that's what I currently need to do, to avoid ending up out of file descriptor (ouch..)

@strk
Copy link
Contributor

strk commented Feb 21, 2013

I've spent some time looking at node-pool, a generic pooler for node.js and I like a couple of behavior that I think would be nice to have in mapnik too:

  1. Async acquisition of a resource from the pool. When no connections are available and no more connections can be created (limit hit) the requests queued up waiting for a resource to become available.
  2. Expiration of idle connections. After some time that a connection is in the pool with nobody requesting it, it's shut down and removed from the queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants