[TinyOWS-dev] Some thoughts and question

Nicklas Avén nicklas.aven at jordogskog.no
Sun Feb 20 15:20:07 EST 2011


Hallo

I have tried to set up TinyOWS.

I have found a few things that I think is not working properly, and then
I have a maybe newbie question about how to success.

I have used ubuntu server 10.10 with lighttpd and fastcgi (not
spawn-fcgi)

In 32 bit I had things working. But then I met a problem which I think
is a bug somewhere. My layer was quite big, about 400 mb as shape-file
with 1.6 million polygons. When I made a getcapabilities request the
server started to calculate the extent of the whole layer which takes
some time. I then tried to use the geobbox option in the config-file for
the layer, but with no success. First, if I understand the source-code
right it is not east, west, north south as the wiki says, but minx,
miny, maxx, maxy (west, south, east, north). I played quite a lot by
changing the order and so but I couldn't make it not calculating the
extent. 
>From the source-code I think the intention is that if there is a valid
geobbox, it should be used instead of calculating the extent, right?
I was curious to find what happened in there, what is the best way of
getting an output at runtime? Is it by sending it to the log-file or
what is the preferred way. There is no prepared debug output, is it? 


Then I wanted to continue trying here at home where I only have a 64 bit
box . I installed a 64 bit ( I will download 32 bit too, to try, next
time I get some time) ubuntu server 10.10 virtulized in kvm.
I wanted to try the same upset so I installed Lighttpd and compiled
fastcgi.

Something that I think is not working as expected is the error-message
if you give wrong connection-parameters to postgis. When I
tried ./tinyows --check with wrong port-number I had an error at line 77
in ows_error.c and no error message telling me what was wrong.


Then, last thing I guess is not TinyOWS that gives me headache but maybe
someone knows in what direction I should look. This should maybe be at
the users list instead ...

As said before

lighttpd webserver with fastcgi.

php is working

/usr/lib/cgi-bin/tinyows --check gives the right answer, but any attempt
to reach tinyows from http only gives a 404-message. 

My 10-fastcgi.conf looks like this:

## FastCGI programs have the same functionality as CGI programs,
## but are considerably faster through lower interpreter startup
## time and socketed communication
##
## Documentation: /usr/share/doc/lighttpd-doc/fastcgi.txt.gz
##                http://www.lighttpd.net/documentation/fastcgi.html

server.modules   += ( "mod_fastcgi" )

## Start an FastCGI server for php (needs the php5-cgi package)
fastcgi.server    = ( ".php" =>
        ((
                "bin-path" => "/usr/bin/php-cgi",
                "socket" => "/tmp/php.socket",
                "max-procs" => 2,
                "idle-timeout" => 20,
                "bin-environment" => (
                        "PHP_FCGI_CHILDREN" => "4",
                        "PHP_FCGI_MAX_REQUESTS" => "10000"
                ),
                "bin-copy-environment" => (
                        "PATH", "SHELL", "USER"
                ),
                "broken-scriptfilename" => "enable"
        ))
        ,
        "/tows" =>
        ((
                "bin-path" => "/usr/lib/cgi-bin/tinyows",
                "socket" => "/tmp/tst.socket"
        ))
)


So, anything looking like /tows is supposed to be sent to tinyows

The strange thing I think is that the webserver access log sees my
request. There is nothing in the webservers error-log and nothing in
tinyows log. I tried to provoke a message by trying to write to the log
the first thing in wfs-function in wfs-request.c

My attemt to write to the log looked like this:

	    ows_log(o, 1, "Ok, start");

But I had nothing in the log.

I did also try things like renaming or removing tinyovs to see if the
webserver reacted on that and then it crashed.

My conclusion is that the request reaches tinyows since the server
crashes without the binary but gives a silent 404 when it is in place. 


I am sorry for the long post, but when I success with this I intend to
write a small tutorial how to get things going with TinyOWS and
lighttpd. I can put it in the wiki if you want. There is a great
tutorial for mapserver and lighttpd at their wiki. That was why I also
wanted to test it with TinyOWS.

Regards

Nicklas









More information about the TinyOWS-dev mailing list