[Geoserver-users] Can geoserver 2.8 manage number of database connections to a given Oracle instance?

I have over a hundred workspaces setup that each use OracleNG to support layers in a specific Oracle schema. But each of these workspaces are connected to the same Oracle instance. While each workspace maintains a connection pool, each pool only knows about its own connections. If I wanted to limit the total connections to this Oracle instance it would seem I’m out of luck? This is a resource problem that I need to solve somehow.

Are there any mechanisms for managing the total connections to an Oracle instance vs. a specific Oracle schema?

If not I may be prone to try and implement something myself. If you know of any hooks in the code where I might implement an interface or something to do this I’m listening!

Thanks, Walter Stovall

Byers Engineering Company

Walter,

Have a look at using a JNDI connection.

http://docs.geoserver.org/maintain/en/user/tutorials/tomcat-jndi/tomcat-jndi.html#tomcat-jndi
<http://docs.geoserver.org/maintain/en/user/tutorials/tomcat-jndi/tomcat-jndi.html#tomcat-jndi&gt;

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Can-geoserver-2-8-manage-number-of-database-connections-to-a-given-Oracle-instance-tp5271268p5271381.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Walter, Have a look at using a JNDI connection. http://docs.geoserver.org/maintain/en/user/tutorials/tomcat-jndi/tomcat-jndi.html#tomcat-jndi


View this message in context: Re: Can geoserver 2.8 manage number of database connections to a given Oracle instance?
Sent from the GeoServer - User mailing list archive at Nabble.com.

Thanks but I don't yet see how this would solve my problem? When I look at the tutorial it shows setting up a tomcat pool that connects to oracle under a specific user name and password.

But in my case I want to limit the number of connections to the Oracle instance itself independent of the user id and password. For example let's say I have 100 geoserver workspaces, each of which manage a pool of connections to a specific Oracle schema (with all such schemas in one oracle instance). Each such pool would login to Oracle under a different user and password. I might want each pool to have as many as 50 active connections, and yet I want to see that regardless, no more than 200 total connections (in all the pools combined) will be created.

In the above scenario of 100 workspaces with 50 connections each you might normally see as many as 5,000 connections. I'm looking for something that will see that regardless, the total connections are kept below a limit of say 200. So three particular pools might create 50 connections and if a 4th pool tries to create a new connection (to this specific oracle instance regardless of schema) that connection will block waiting for the limit to go below 200.

Does JNDI create a way of doing that?

Thanks, Walter

-----Original Message-----
From: Rob L [mailto:Robert.Langford@anonymised.com]
Sent: Monday, June 13, 2016 8:45 AM
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Can geoserver 2.8 manage number of database connections to a given Oracle instance?

Walter,

Have a look at using a JNDI connection.

http://docs.geoserver.org/maintain/en/user/tutorials/tomcat-jndi/tomcat-jndi.html#tomcat-jndi
<http://docs.geoserver.org/maintain/en/user/tutorials/tomcat-jndi/tomcat-jndi.html#tomcat-jndi&gt;

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Can-geoserver-2-8-manage-number-of-database-connections-to-a-given-Oracle-instance-tp5271268p5271381.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Walter,
I don’t think I’ve ever heard of any connection pooling library able to limit the total amount
of connections across several pools.
A Google search for “limit number of jdbc connections across multiple connection pools” also comes out empty as far as I can tell.

If in your use case there is a correspondence between a GeoServer user and a database user, maybe you can use
a single connection pool, and impersonation to change the current user:
http://docs.geoserver.org/latest/en/user/data/database/sqlsession.html#data-sqlsession

Just thinking out loud here :slight_smile:

Cheers
Andrea

···

On Mon, Jun 13, 2016 at 3:45 PM, Walter Stovall <walter.stovall@anonymised.com> wrote:

Thanks but I don’t yet see how this would solve my problem? When I look at the tutorial it shows setting up a tomcat pool that connects to oracle under a specific user name and password.

But in my case I want to limit the number of connections to the Oracle instance itself independent of the user id and password. For example let’s say I have 100 geoserver workspaces, each of which manage a pool of connections to a specific Oracle schema (with all such schemas in one oracle instance). Each such pool would login to Oracle under a different user and password. I might want each pool to have as many as 50 active connections, and yet I want to see that regardless, no more than 200 total connections (in all the pools combined) will be created.

In the above scenario of 100 workspaces with 50 connections each you might normally see as many as 5,000 connections. I’m looking for something that will see that regardless, the total connections are kept below a limit of say 200. So three particular pools might create 50 connections and if a 4th pool tries to create a new connection (to this specific oracle instance regardless of schema) that connection will block waiting for the limit to go below 200.

Does JNDI create a way of doing that?

Thanks, Walter

-----Original Message-----
From: Rob L [mailto:Robert.Langford@anonymised.com]
Sent: Monday, June 13, 2016 8:45 AM
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Can geoserver 2.8 manage number of database connections to a given Oracle instance?

Walter,

Have a look at using a JNDI connection.

http://docs.geoserver.org/maintain/en/user/tutorials/tomcat-jndi/tomcat-jndi.html#tomcat-jndi
<http://docs.geoserver.org/maintain/en/user/tutorials/tomcat-jndi/tomcat-jndi.html#tomcat-jndi>


View this message in context: http://osgeo-org.1560.x6.nabble.com/Can-geoserver-2-8-manage-number-of-database-connections-to-a-given-Oracle-instance-tp5271268p5271381.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

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

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


My situation is not so clean as that in that my users don’t literally have database accounts. But that doesn’t mean I can’t learn what the database user/schema is from the authenticated user name. I may be able to work with the framework you point to for impersonation and get a solution that works for me.

Thanks for the suggestion!

Walter

···

Hi Walter,

I don’t think I’ve ever heard of any connection pooling library able to limit the total amount

of connections across several pools.

A Google search for “limit number of jdbc connections across multiple connection pools” also comes out empty as far as I can tell.

If in your use case there is a correspondence between a GeoServer user and a database user, maybe you can use

a single connection pool, and impersonation to change the current user:

http://docs.geoserver.org/latest/en/user/data/database/sqlsession.html#data-sqlsession

Just thinking out loud here :slight_smile:

Cheers

Andrea

On Mon, Jun 13, 2016 at 3:45 PM, Walter Stovall <walter.stovall@…7262…> wrote:

Thanks but I don’t yet see how this would solve my problem? When I look at the tutorial it shows setting up a tomcat pool that connects to oracle under a specific user name and password.

But in my case I want to limit the number of connections to the Oracle instance itself independent of the user id and password. For example let’s say I have 100 geoserver workspaces, each of which manage a pool of connections to a specific Oracle schema (with all such schemas in one oracle instance). Each such pool would login to Oracle under a different user and password. I might want each pool to have as many as 50 active connections, and yet I want to see that regardless, no more than 200 total connections (in all the pools combined) will be created.

In the above scenario of 100 workspaces with 50 connections each you might normally see as many as 5,000 connections. I’m looking for something that will see that regardless, the total connections are kept below a limit of say 200. So three particular pools might create 50 connections and if a 4th pool tries to create a new connection (to this specific oracle instance regardless of schema) that connection will block waiting for the limit to go below 200.

Does JNDI create a way of doing that?

Thanks, Walter

-----Original Message-----
From: Rob L [mailto:Robert.Langford@…5490…]
Sent: Monday, June 13, 2016 8:45 AM
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Can geoserver 2.8 manage number of database connections to a given Oracle instance?

Walter,

Have a look at using a JNDI connection.

http://docs.geoserver.org/maintain/en/user/tutorials/tomcat-jndi/tomcat-jndi.html#tomcat-jndi
<http://docs.geoserver.org/maintain/en/user/tutorials/tomcat-jndi/tomcat-jndi.html#tomcat-jndi>


View this message in context: http://osgeo-org.1560.x6.nabble.com/Can-geoserver-2-8-manage-number-of-database-connections-to-a-given-Oracle-instance-tp5271268p5271381.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/it488V for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.