[Geoserver-devel] Geoserver leak for Oracle queries?

Hi list,

When using Geoserver (version 1.2.3, using oracle-spatial-2.0.x.jar with some adaptions from http://jira.codehaus.org/browse/GEOS-232, but these are not related/relevant I think), there seems to be a problem with closing cursors (queries). Eventually this causes Geoserver to throw an exception (org.geotools.data.DataSourceException: Could not count). This exception is caused by an Oracle exception: ORA-01000: maximum open cursors exceeded. In general, this exception is caused when an application is not closing its queries (cursors) correctly.

When taking a look at the cursors that remain opened (in Oracle), there is one cursor (SQL-query) that comes up a lot:

SELECT info from SCS.MDRT_112AA$ where rowid = :rid

This is a query on a spatial index (SCS.MDRT_112AA$). I think that Geoserver may not close this one correctly, but I'm not sure. Note that there is another application (UMN Mapserver) that uses the same database. It might be that this application doens't close its queries correctly. So I'm trying to find where this SQL is generated (is it by Geoserver or UMN Mapserver). Does somebody have an idea on this, i.e. in what part of the Java code of Geoserver can I find this kind of SQL?

Or did somebody have this problem (with too many open cursors) as well?

Many thanks in advance!

Best regards,
Thijs

Hmmm...

I'm going to say that it's MapServer, but they'll probably say it's
GeoServer :wink: It would be very helpful if you could test with one and
then the other.

But I say MapServer because this is the first report of open cursors
that we've had in quite a long time. And secondly because I know the
oracle datastore reasonably well, and can't think of a line of code
that does such a request, especially not often. I could be wrong, it
could be plugged into some other query, like is info the only column
name of the table? Or is this a specific index call? Because I don't
think we make any calls on the index... And I also don't recognize the
:rid thing at all.

Chris

Quoting Thijs Brentjens <thijs.brentjens@anonymised.com>:

Hi list,

When using Geoserver (version 1.2.3, using oracle-spatial-2.0.x.jar
with
some adaptions from http://jira.codehaus.org/browse/GEOS-232, but
these are
not related/relevant I think), there seems to be a problem with
closing
cursors (queries). Eventually this causes Geoserver to throw an
exception
(org.geotools.data.DataSourceException: Could not count). This
exception is
caused by an Oracle exception: ORA-01000: maximum open cursors
exceeded. In
general, this exception is caused when an application is not closing
its
queries (cursors) correctly.

When taking a look at the cursors that remain opened (in Oracle),
there is
one cursor (SQL-query) that comes up a lot:

SELECT info from SCS.MDRT_112AA$ where rowid = :rid

This is a query on a spatial index (SCS.MDRT_112AA$). I think that
Geoserver may not close this one correctly, but I'm not sure. Note
that
there is another application (UMN Mapserver) that uses the same
database.
It might be that this application doens't close its queries
correctly. So
I'm trying to find where this SQL is generated (is it by Geoserver or
UMN
Mapserver). Does somebody have an idea on this, i.e. in what part of
the
Java code of Geoserver can I find this kind of SQL?

Or did somebody have this problem (with too many open cursors) as
well?

Many thanks in advance!

Best regards,
Thijs

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great
events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play
to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

Thanks for replying so quickly. I'll move the focus to Mapserver then. And using the info column is a specific index call (AFAIK). I thought that the call might be done by Oracle (internally). But as far as I've understood from an Oracle-export it is not very likely that Oracle would done this way. So I'll check Mapserver and let you know if I found anything.

Thijs

At 17:46 4-5-2005, Chris Holmes wrote:

Hmmm...

I'm going to say that it's MapServer, but they'll probably say it's
GeoServer :wink: It would be very helpful if you could test with one and
then the other.

But I say MapServer because this is the first report of open cursors
that we've had in quite a long time. And secondly because I know the
oracle datastore reasonably well, and can't think of a line of code
that does such a request, especially not often. I could be wrong, it
could be plugged into some other query, like is info the only column
name of the table? Or is this a specific index call? Because I don't
think we make any calls on the index... And I also don't recognize the
:rid thing at all.

Chris

Quoting Thijs Brentjens <thijs.brentjens@anonymised.com>:

> Hi list,
>
> When using Geoserver (version 1.2.3, using oracle-spatial-2.0.x.jar
> with
> some adaptions from http://jira.codehaus.org/browse/GEOS-232, but
> these are
> not related/relevant I think), there seems to be a problem with
> closing
> cursors (queries). Eventually this causes Geoserver to throw an
> exception
> (org.geotools.data.DataSourceException: Could not count). This
> exception is
> caused by an Oracle exception: ORA-01000: maximum open cursors
> exceeded. In
> general, this exception is caused when an application is not closing
> its
> queries (cursors) correctly.
>
> When taking a look at the cursors that remain opened (in Oracle),
> there is
> one cursor (SQL-query) that comes up a lot:
>
> SELECT info from SCS.MDRT_112AA$ where rowid = :rid
>
> This is a query on a spatial index (SCS.MDRT_112AA$). I think that
> Geoserver may not close this one correctly, but I'm not sure. Note
> that
> there is another application (UMN Mapserver) that uses the same
> database.
> It might be that this application doens't close its queries
> correctly. So
> I'm trying to find where this SQL is generated (is it by Geoserver or
> UMN
> Mapserver). Does somebody have an idea on this, i.e. in what part of
> the
> Java code of Geoserver can I find this kind of SQL?
>
> Or did somebody have this problem (with too many open cursors) as
> well?
>
> Many thanks in advance!
>
> Best regards,
> Thijs
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4 great
> events, 4
> opportunities to win big! Highest score wins.NEC IT Guy Games. Play
> to
> win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel