Yes, that is what I was seeing ... for every REST call to harvest, a new db
connection was made.  To know if you're seeing the same, it would probably
be better to do more than just 1 harvest ... if you were to make maybe 10
or so REST calls and verify that the number of db connections also
increased by 10, I think we could say you were seeing the same behavior.

- Mike

On Wed, Apr 29, 2015 at 11:39 AM, Christoph Kleih <[email protected]> wrote:

>  Hello Mike, Andrea,
>
> I started the query, you mentioned. I have currently 128 rows.
> After ingesting an image via REST to a mosaic, I had 129 rows.
>
> Will these connections get a timeout or something like that after some
> time?
>
> Is that still the same behaviour you had? Is it worth to create an issue
> in JIRA?
>
> Thank you for the link with the instructions and the additional hints.
>
> Kind regards,
> Christoph
>
>
>
> Am 29.04.2015 15:46, schrieb Mike Grogan:
>
>  Instructions can be found at:
> http://geoserver.geo-solutions.it/multidim/en/imagemosaic/mosaic_datastore.html.
> See the JNDI section.  One warning, I found that the
> minEvictableIdleTimeMillis and   timeBetweenEvictionRunsMillis settings in
> the examples seemed to oddly cause me problems with stale database
> connections that didn't seem to get validated before re-use.
>
>  Take a look at this user list conversation between Andrea and me:
> http://osgeo-org.1560.x6.nabble.com/postgres-connection-exhaustion-Image-Mosaic-Harvesting-td5200863.html
>
>  It discusses the connection exhaustion issue I was seeing when
> harvesting granules via REST and discusses transitioning to JNDI.
>
>  Before you switch to JNDI, I would be interested to see how many
> postgres connections you show with the psql command "select datid, datname,
> pid, client_addr, client_port, state, query from pg_stat_activity;."  Do
> your number of connections increase each time you harvest a granule?  Just
> wondering if you are seeing the same thing as me.  I should have opened a
> JIRA issue on this, but the transition to the new JIRA was ongoing and then
> I got lazy.
>
>  Thanks,
>
>  Mike Grogan
>
>
> On Wed, Apr 29, 2015 at 9:09 AM, Christoph Kleih <[email protected]> wrote:
>
>>  Dear Mike,
>>
>> thank you for your response.
>> I am setting the database information in the datastore.properties file.
>> Does it make sense to switch to JNDI?
>> Can I still activate that?
>>
>> Thank you,
>> Christoph
>>
>>
>>
>> Am 29.04.2015 15:04, schrieb Mike Grogan:
>>
>> Christoph,
>>
>>  Are you using JNDI or just directly setting your database settings in
>> the datastore.properties file?  I ask this because I was seeing what looked
>> like a connection starvation / connection leak issue harvesting image
>> mosaic granules without using JNDI.  Your "too many clients already" error
>> makes me wonder if you are seeing a similar issue.
>>
>>
>>  - Mike
>>
>>
>>
>> On Tue, Apr 28, 2015 at 6:59 AM, Christoph Kleih <[email protected]> wrote:
>>
>>>  Dear all,
>>>
>>> I am running geoserver 2.7.0 on a Ubuntu 14.04.
>>>
>>> I am using the REST interface to append images to a mosaic time series.
>>> That works fine. But some things happen in the logfiles which I cannot
>>> explain.
>>>
>>> May be you can give me an advice, what I can improve, to solve some of
>>> the below mentioned log messages.
>>>
>>> Here are the excerpts from the logfiles:
>>>
>>> postgres logfile:
>>> 2015-04-28 12:28:56 CEST ERROR:  stats for "my_layer.the_geom" do not
>>> exist
>>> 2015-04-28 12:28:56 CEST CONTEXT:  SQL function "st_estimated_extent"
>>> statement 2
>>> 2015-04-28 12:28:56 CEST STATEMENT:  select
>>> ST_AsText(ST_force_2d(ST_Envelope(ST_Estimated_Extent('public', 'my_layer',
>>> 'the_geom'))))
>>>
>>> geoserver logfile:
>>> 2015-04-28 10:29:48,857 WARN [geotools.jdbc] - Failed to use
>>> ST_Estimated_Extent, falling back on envelope aggregation
>>> org.postgresql.util.PSQLException: ERROR: stats for "my_layer.the_geom"
>>> do not exist
>>>   Wobei: SQL function "st_estimated_extent" statement 2
>>>     at
>>> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
>>>
>>>  description=Features from JDBCDataStore
>>> 2015-04-28 10:33:52,648 WARN [imagemosaic.catalog] - This granule
>>> catalog was not properly dispose as it still points to:  ServiceInfo
>>>  description=Features from JDBCDataStore
>>>
>>> Is that connected with this:
>>> http://docs.geoserver.org/stable/en/user/data/database/primarykey.html
>>>
>>> After many ingestions, I also get this message in the postgres log:
>>> 2015-04-27 18:48:04 CEST FATAL:  sorry, too many clients already
>>>
>>> Thank you for any suggestions.
>>>
>>> Christoph
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>> Widest out-of-the-box monitoring support with 50+ applications
>>> Performance metrics, stats and reports that give you Actionable Insights
>>> Deep dive visibility with transaction tracing using APM Insight.
>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>> _______________________________________________
>>> Geoserver-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>>
>>
>>
>
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to