On Wed, Jun 26, 2013 at 4:46 AM, David Niedzielski <
david.niedziel...@gmail.com> wrote:

> Using GeoServer 2.2.1 and 2.3 with a large number of PostGIS-backed
> datastores under TomCat 6.2.    These stores are rarely used, so we'd like
> them to not tie up a PostgreSQL connection until one is actually needed.
> Thus, we set min_connections=0 in the datastore.xml associated with each
> store.  Interestingly, when GeoServer is bounced, there is a single
> connection bound to PostgreSQL for each store anyway.  If we use the admin
> interface and open the store definition, "min_connections" shows 0, which
> is what one would expect.  Now, simply saving the store definition without
> modifying anything causes the corresponding DB connection to be dropped,
> and a connection is not bound again until the datastore is used or until
> GeoServer is bounced again.
>

On startup GeoServer verifies that each and every feature type is actually
accessible (the store is up, the feature type structure can be computed),
this requires a connection (which is going to be dropped after a timeout I
believe, but I don't remember what the timeout is).

If you have many stores pointing at the same database, but using different
schemas, you're "doing it wrong (tm)", the way to go is
to setup a connection pool inside Tomcat and then call onto it via JNDI,
there is an example of how this can be done here:
http://docs.geoserver.org/stable/en/user/tutorials/tomcat-jndi/tomcat-jndi.html
This way all stores will share the same connection pool, and during startup
a single connection will be taken and reused
over and over to check the feature types are good.

Cheers
Andrea


-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to