[Geomoose-users] itemquery against postgis causes php-cgi.exe crash in gdal17dev.dll and ntdll.dll

Johan Forsman Johan.Forsman at LA.GOV
Fri Dec 4 16:08:12 EST 2009


Hello All:

I do not know what the proper place to report this issue may be, but I thought I would start here hoping you can steer me in the right direction.

We have a small, internal to my organization, mapserver on WinXP, currently using MS4W 3.0 beta 6, with GeoMoose 2.0.1, primarily with shapefiles. Against our largest dataset, briefly described beliw, the query function in GeoMoose is too slow against the shapefile for practical use and it was suggested by Dan Little to try the PostGIS system instead to speed up response time of the query. The response time is better, but the critical issue in the subject line is something I have been unable to track down.

I installed and configured PostgreSQL 8.4.0 and PostGIS 1.4 without issues, and I am using pgAdmin to help me along with configuration. I created a new database "sdwp" instead of using the default "postgres" database

Following Dan's directions I ingested the shapefile into PostGIS without issues and built an index on the field of interest to the query, then changed the mapfile to point to PostGIS instead of the shapefile.

Display of data from PostGIS works fine, but every time I execute the query there is a crash of php-cgi.exe on the server. The message on the server is the generic crash message from WinXP: CGI/FastCGI has encountered a problem and needs to close.

One strange thing is that the crash occurs in two separate modules depending on which dataset I query against.

Dataset A: Full dataset of ~180000 water wells, 34 total columns, indexed on geometry, [regowner], and [newid].
Dataset B: Subset of dataset A, ~20000 water wells.

Both are point data, and were ingested from individual shapefiles, and are currently stored as separate tables in the same PostGIS database, with separate indexes.

The error symptoms are relatively consistent, but not bullet-proof. Described below is what appears to happen  about 60% of the time. The other 40% it still crashes, but the gdal17dev.dll may not be reported.

For dataset A the crash first occurs in gdal17dev.dll, then repeatedly in ntdll.dll shortly after clicking the "Don't Send" button (Remote Desktop control). I click the Don't Send button several times to dismiss the crash dialogs that pop up.

For dataset B the crash occurs only in ntdll.dll, and only once per query attempt.  

Once the crash has occurred I click the Don't Send button in the crash dialog on the server and one of two things will happen depending on the active dataset. 

Dataset A: 1) if there ARE NO matches for the query parameter GeoMoose immediately returns a message to that effect; 2) if there ARE matches to the query parameter GeoMoose returns the correct number of records.

Dataset B: 1) if there ARE NO matches for the query parameter GeoMoose immediately returns a message to that effect; 2) if there ARE  matches to the query parameter the server returns an Unhandled Request return, Internal Server Error message after a several-second delay.

In either case I have to Remote Desktop to the server and click the Don't Send button on the crash dialog to continue.

I don't even know where to start collecting evidence. Red herrings everywhere I suspect. This problem does not appear if I use shapefiles, but the query takes too long for practical use. PHP issue? GeoMoose issue? OpenLayers issue? Mapserver issue? Windows issue? PostGIS issue? Yes to all or some of that?

There is an error shown in the PostGIS log, but I do not know if it is relevant (symptom, disease, or neither):

2009-12-03 09:23:24 CSTLOG:  could not receive data from client: No connection could be made because the target machine actively refused it.	
2009-12-03 09:23:24 CSTLOG:  unexpected EOF on client connection	

I have attempted to isolate the issue a little more and queried Mapserver directly via CGI:
 
http://geoview/cgi-bin/mapserv.exe?map=/ms4w/apps/geomoose2/maps/sdwp/wells/wells.map&layers=ldotd_all&mode=itemnquery&qlayer=ldotd_all&qitem=regowner&qstring=%28regowner%20like%20%27%25RED%20OAK%25%27%29

with some really ugly escape sequences. The qstring is really (regowner like '%RED OAK%').
When I pass this string directly to CGI it takes 45 seconds to return the 22 matches, which is a bit faster than geomoose, and the CGI query never triggers the crash. I have already increased the
 
max_execution_time
max_input_time
default_socket_timeout

parameters in php.ini to 90 seconds, which is substantially longer than any error interval, and restarting Apache without any change in behavior. 

Also, after a executing a geomoose search I find this in ms_error.txt:

[Fri Dec 04 09:21:52 2009].453000 msLoadMap(): 0.407s [Fri Dec 04 09:21:52 2009].484000 getSymbol(): Symbol definition error. Parsing error near (regowner):(line 452) [Fri Dec 04 09:21:52 2009].484000 msPostGISLayerIsOpen called.

I do not know which file triggers the getSymbol() error shown. I tried setting DEBUG to 10 in the mapfile, but there are no more details. Resorting to a string search in all files beneath /ms4w did not return any files containing that string anywhere near that line. In fact, only one file containing that string is longer than 100 lines. I'd sure like to know where that error is happening.

What information do I need to collect, how do I collect it, and where should I send it to help with resolving this?

Thank you for your consideration.

Respectfully,
Johan.




More information about the Geomoose-users mailing list