Mapserver leaving cursors opened in Oracle?

Fernando Simon fsimon at UNIVALI.BR
Fri May 13 07:22:00 EDT 2005


Hi,
    I don't believe that this query was made by
Mapserver/maporaclespatial.c. Maporaclespatial.c use the rownum and not
rowid when the user don't specify any UNIQUE parameter in data, I did
this because the internal shapeindex in Mapserver is a long parameter.
For query functions in Mapserver you need to specify a UNIQUE parameter
in you data, and the column that you specify need to store only numbers
type. Of course that Oracle use internal cursors to execute any query,
in maporaclespatial.c I execute the query directly without a cursor, a
direct call using OCI.
   Can you show how you defined your DATA parameter for your layer? What
version of Mapserver are you using?
   Here we use many projects that use query functions for Oracle (10G)
and we never had this problem, using mapserver with or without fastcgi
support.
   Thanks.

------------------------------------------------------------------------
Fernando Simon
Mapserver and Oracle Spatial developer
G10 - Laboratorio de Computacao Aplicada - Brazil
http://g10.cttmar.univali.br - UNIVALI/CTTMAR
------------------------------------------------------------------------


Thijs Brentjens wrote:

> Hi list,
>
> This problem was posted on the list of Geoserver as well because it is
> either related to Geoserver or to Mapserver. These two applications are
> running on the same Oracle database. It seems that Geoserver is not
> causing
> it, so maybe somebody at this list can help me out :).
>
> Anyway, there seems to be a problem with closing cursors (queries) on an
> Oracle 10g database. Eventually this causes Oracle to throw an error:
>
> ORA-01000: maximum open cursors exceeded.
>
> AFAIK, 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
> Mapserver may not close this one correctly, but I'm not sure. Can anyone
> tell me whether this SQL is made by Mapserver? Or did somebody have this
> problem (with too many open cursors) as well?
>
> Regards,
> Thijs
>



More information about the mapserver-dev mailing list