PROCESSING : Connection to Postgis (defer or always)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

PROCESSING : Connection to Postgis (defer or always)

sam2604

I have 100 layers with data connection to postgis (10 mapfiles). In the mapserver (v. 7) documentation there is a point (which I do not understand) regarding the

PROCESSING "CLOSE_CONNECTION=ALWAYS" OR PROCESSING "CLOSE_CONNECTION=DEFER"

Now if I do a tile cache for all the layer together.. Is-it better to use Defer or always. Actually when we should use always and when we should use defer?

Thanks for a simple explanation 


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
ma_sam
Reply | Threaded
Open this post in threaded view
|

Re: PROCESSING : Connection to Postgis (defer or always)

Carlos Ruiz
Milad,

You can use the directive PROCESSING "CLOSE_CONNECTION=DEFER" when you have several PostGIS layers to be rendered to reduce the time because of opening the database connections. This means that once the database connection is established for the first time, it will be shared for all the layers which use the same connection string (same host, database, user and password). This takes less time consuming than opening and closing a database connection for each layer (PROCESSING "CLOSE_CONNECTION=ALWAYS").

Cheers


From: milad nidal <[hidden email]>
To: MapserverList OSGEO <[hidden email]>
Sent: Wednesday, January 25, 2017 11:39 AM
Subject: [mapserver-users] PROCESSING : Connection to Postgis (defer or always)

I have 100 layers with data connection to postgis (10 mapfiles). In the mapserver (v. 7) documentation there is a point (which I do not understand) regarding the
PROCESSING "CLOSE_CONNECTION=ALWAYS" OR PROCESSING "CLOSE_CONNECTION=DEFER"
Now if I do a tile cache for all the layer together.. Is-it better to use Defer or always. Actually when we should use always and when we should use defer?
Thanks for a simple explanation 

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: PROCESSING : Connection to Postgis (defer or always)

sam2604
In reply to this post by sam2604
Ok.. thanks a lot

On Wed, Jan 25, 2017 at 12:39 PM, milad nidal <[hidden email]> wrote:

I have 100 layers with data connection to postgis (10 mapfiles). In the mapserver (v. 7) documentation there is a point (which I do not understand) regarding the

PROCESSING "CLOSE_CONNECTION=ALWAYS" OR PROCESSING "CLOSE_CONNECTION=DEFER"

Now if I do a tile cache for all the layer together.. Is-it better to use Defer or always. Actually when we should use always and when we should use defer?

Thanks for a simple explanation 



_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
ma_sam