tilecache_seed dies at a specific tile - how can I skip it?

4 messages Options
Embed this post
Permalink
Adrian Popa

tilecache_seed dies at a specific tile - how can I skip it?

Reply Threaded More More options
Print post
Permalink
Hello everyone,

I'm getting an error while trying to cache offline parts of my map. The
caching process runs fine until it hits a particular tile (my guess is
it's tile 9143) - when the process dies (after a timeout of 2 minutes).

Here are samples of the output:

[root@terra utilities]# python /var/www/html/tilecache/tilecache_seed.py
rtc_base 1 10 --bbox
2255332.8831578,5336357.2739115,3306188.8761,6183726.4985628
...
07 (004621, 005229) = (2568284.1491 5542601.7932 2573176.1189
5547493.7630) [0.0003s : 2391.549/s] 9137/37195
07 (004622, 005229) = (2573176.1189 5542601.7932 2578068.0887
5547493.7630) [0.0003s : 2391.566/s] 9138/37195
07 (004623, 005229) = (2578068.0887 5542601.7932 2582960.0586
5547493.7630) [0.0003s : 2391.586/s] 9139/37195
07 (004624, 005229) = (2582960.0586 5542601.7932 2587852.0284
5547493.7630) [0.0003s : 2391.606/s] 9140/37195
07 (004625, 005229) = (2587852.0284 5542601.7932 2592743.9982
5547493.7630) [0.0003s : 2391.624/s] 9141/37195
07 (004626, 005229) = (2592743.9982 5542601.7932 2597635.9680
5547493.7630) [0.0003s : 2391.643/s] 9142/37195
Traceback (most recent call last):
  File "/var/www/html/tilecache/tilecache_seed.py", line 9, in ?
    TileCache.Client.main()
  File
"/usr/lib/python2.4/site-packages/TileCache-2.10-py2.4.egg/TileCache/Client.py",
line 162, in main
    seed(svc, layer, map(int, args[1:3]), bboxlist ,
padding=options.padding, force = options.force, reverse = options.reverse)
  File
"/usr/lib/python2.4/site-packages/TileCache-2.10-py2.4.egg/TileCache/Client.py",
line 117, in seed
    svc.renderTile(tile,force=force)
  File
"/usr/lib/python2.4/site-packages/TileCache-2.10-py2.4.egg/TileCache/Service.py",
line 138, in renderTile
    data = layer.render(tile, force=force)
  File
"/usr/lib/python2.4/site-packages/TileCache-2.10-py2.4.egg/TileCache/Layer.py",
line 443, in render
    return self.renderTile(tile)
  File
"/usr/lib/python2.4/site-packages/TileCache-2.10-py2.4.egg/TileCache/Layers/WMS.py",
line 29, in renderTile
    tile.data, response = wms.fetch()
  File
"/usr/lib/python2.4/site-packages/TileCache-2.10-py2.4.egg/TileCache/Client.py",
line 58, in fetch
    response = self.client.open(urlrequest)
  File "/usr/lib/python2.4/urllib2.py", line 364, in open
    response = meth(req, response)
  File "/usr/lib/python2.4/urllib2.py", line 471, in http_response
    response = self.parent.error(
  File "/usr/lib/python2.4/urllib2.py", line 402, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.4/urllib2.py", line 480, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 500: Internal Server Error

Here is what httpd error_log says:
[Mon Oct 26 09:23:13 2009] [warn] [client 127.0.0.1] Timeout waiting for
output from CGI script /var/www/cgi-bin/mapserv
[Mon Oct 26 09:23:13 2009] [error] [client 127.0.0.1] Premature end of
script headers: mapserv
[Mon Oct 26 09:25:13 2009] [warn] [client 127.0.0.1] Timeout waiting for
output from CGI script /var/www/cgi-bin/mapserv


If I try with the --reverse parameter, the same thing happens after a
while, but at a different tile.

I have two questions:
1. Can I convince tilecache to skip the tiles it can't render, instead
of dying?
2. What would be the necessary steps I need to take to troubleshoot this
problem? (I am generating this cache from a mapserver which is getting
its data from shapefiles).

Thanks,
Adrian

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
soatley

Re: tilecache_seed dies at a specific tile - how can I skipit?

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
I'm not sure how it works on Linux, but on Windows, the URL is mapserv.exe (your link it appears to be just mapserv). 
 
Shawn

>>> On 10/26/2009 at 3:41 AM, Adrian Popa <[hidden email]> wrote:
Hello everyone,

I'm getting an error while trying to cache offline parts of my map. The
caching process runs fine until it hits a particular tile (my guess is
it's tile 9143) - when the process dies (after a timeout of 2 minutes).

Here are samples of the output:

[root@terra utilities]# python /var/www/html/tilecache/tilecache_seed.py
rtc_base 1 10 --bbox
2255332.8831578,5336357.2739115,3306188.8761,6183726.4985628
...
07 (004621, 005229) = (2568284.1491 5542601.7932 2573176.1189
5547493.7630) [0.0003s : 2391.549/s] 9137/37195
07 (004622, 005229) = (2573176.1189 5542601.7932 2578068.0887
5547493.7630) [0.0003s : 2391.566/s] 9138/37195
07 (004623, 005229) = (2578068.0887 5542601.7932 2582960.0586
5547493.7630) [0.0003s : 2391.586/s] 9139/37195
07 (004624, 005229) = (2582960.0586 5542601.7932 2587852.0284
5547493.7630) [0.0003s : 2391.606/s] 9140/37195
07 (004625, 005229) = (2587852.0284 5542601.7932 2592743.9982
5547493.7630) [0.0003s : 2391.624/s] 9141/37195
07 (004626, 005229) = (2592743.9982 5542601.7932 2597635.9680
5547493.7630) [0.0003s : 2391.643/s] 9142/37195
Traceback (most recent call last):
  File "/var/www/html/tilecache/tilecache_seed.py", line 9, in ?
    TileCache.Client.main()
  File
"/usr/lib/python2.4/site-packages/TileCache-2.10-py2.4.egg/TileCache/Client.py",
line 162, in main
    seed(svc, layer, map(int, args[1:3]), bboxlist ,
padding=options.padding, force = options.force, reverse = options.reverse)
  File
"/usr/lib/python2.4/site-packages/TileCache-2.10-py2.4.egg/TileCache/Client.py",
line 117, in seed
    svc.renderTile(tile,force=force)
  File
"/usr/lib/python2.4/site-packages/TileCache-2.10-py2.4.egg/TileCache/Service.py",
line 138, in renderTile
    data = layer.render(tile, force=force)
  File
"/usr/lib/python2.4/site-packages/TileCache-2.10-py2.4.egg/TileCache/Layer.py",
line 443, in render
    return self.renderTile(tile)
  File
"/usr/lib/python2.4/site-packages/TileCache-2.10-py2.4.egg/TileCache/Layers/WMS.py",
line 29, in renderTile
    tile.data, response = wms.fetch()
  File
"/usr/lib/python2.4/site-packages/TileCache-2.10-py2.4.egg/TileCache/Client.py",
line 58, in fetch
    response = self.client.open(urlrequest)
  File "/usr/lib/python2.4/urllib2.py", line 364, in open
    response = meth(req, response)
  File "/usr/lib/python2.4/urllib2.py", line 471, in http_response
    response = self.parent.error(
  File "/usr/lib/python2.4/urllib2.py", line 402, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.4/urllib2.py", line 480, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 500: Internal Server Error

Here is what httpd error_log says:
[Mon Oct 26 09:23:13 2009] [warn] [client 127.0.0.1] Timeout waiting for
output from CGI script /var/www/cgi-bin/mapserv
[Mon Oct 26 09:23:13 2009] [error] [client 127.0.0.1] Premature end of
script headers: mapserv
[Mon Oct 26 09:25:13 2009] [warn] [client 127.0.0.1] Timeout waiting for
output from CGI script /var/www/cgi-bin/mapserv


If I try with the --reverse parameter, the same thing happens after a
while, but at a different tile.

I have two questions:
1. Can I convince tilecache to skip the tiles it can't render, instead
of dying?
2. What would be the necessary steps I need to take to troubleshoot this
problem? (I am generating this cache from a mapserver which is getting
its data from shapefiles).

Thanks,
Adrian

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Christopher Schmidt-2

Re: tilecache_seed dies at a specific tile - how can I skip it?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Adrian Popa
On Mon, Oct 26, 2009 at 09:41:22AM +0200, Adrian Popa wrote:

> Hello everyone,
>
> I'm getting an error while trying to cache offline parts of my map. The
> caching process runs fine until it hits a particular tile (my guess is
> it's tile 9143) - when the process dies (after a timeout of 2 minutes).
>
> Here are samples of the output:
>
> [root@terra utilities]# python /var/www/html/tilecache/tilecache_seed.py
> rtc_base 1 10 --bbox
> 2255332.8831578,5336357.2739115,3306188.8761,6183726.4985628
> ...
> 07 (004621, 005229) = (2568284.1491 5542601.7932 2573176.1189
> 5547493.7630) [0.0003s : 2391.549/s] 9137/37195
>   File "/usr/lib/python2.4/urllib2.py", line 480, in http_error_default
>     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
> urllib2.HTTPError: HTTP Error 500: Internal Server Error
>
> Here is what httpd error_log says:
> [Mon Oct 26 09:23:13 2009] [warn] [client 127.0.0.1] Timeout waiting for
> output from CGI script /var/www/cgi-bin/mapserv
> [Mon Oct 26 09:23:13 2009] [error] [client 127.0.0.1] Premature end of
> script headers: mapserv
> [Mon Oct 26 09:25:13 2009] [warn] [client 127.0.0.1] Timeout waiting for
> output from CGI script /var/www/cgi-bin/mapserv
>
>
> If I try with the --reverse parameter, the same thing happens after a
> while, but at a different tile.
>
> I have two questions:
> 1. Can I convince tilecache to skip the tiles it can't render, instead
> of dying?

Not build in, but you can certainly modify the client to catch errors and
keep going.

> 2. What would be the necessary steps I need to take to troubleshoot this
> problem? (I am generating this cache from a mapserver which is getting
> its data from shapefiles).

Look in the apache logs for the mapserver, look at what the URL is,
and send it to the mapserver. See if it fails in the same way. If so, it's
a mapserver 'issue' (quotes because it may simply be taking too long to do
this tile, and the actual issue is that you need to bump up your apache
timeout), and can be treated externally to TileCache.

-- Chris

>
> Thanks,
> Adrian
>
> _______________________________________________
> Tilecache mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/tilecache

--
Christopher Schmidt
MetaCarta
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Adrian Popa

Re: tilecache_seed dies at a specific tile - how can I skip it?

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Thanks for the help,

Unfortunately I am not a python programmer (perl is my thing), but I will *try* to have a look in the source code, or try to catch the url from apache (unfortunately the server is in production and has lots of requests)...

Regards,
Adrian

Christopher Schmidt wrote:
On Mon, Oct 26, 2009 at 09:41:22AM +0200, Adrian Popa wrote:
  
Hello everyone,

I'm getting an error while trying to cache offline parts of my map. The 
caching process runs fine until it hits a particular tile (my guess is 
it's tile 9143) - when the process dies (after a timeout of 2 minutes).

Here are samples of the output:

[root@terra utilities]# python /var/www/html/tilecache/tilecache_seed.py 
rtc_base 1 10 --bbox 
2255332.8831578,5336357.2739115,3306188.8761,6183726.4985628
...
07 (004621, 005229) = (2568284.1491 5542601.7932 2573176.1189 
5547493.7630) [0.0003s : 2391.549/s] 9137/37195
  File "/usr/lib/python2.4/urllib2.py", line 480, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 500: Internal Server Error

Here is what httpd error_log says:
[Mon Oct 26 09:23:13 2009] [warn] [client 127.0.0.1] Timeout waiting for 
output from CGI script /var/www/cgi-bin/mapserv
[Mon Oct 26 09:23:13 2009] [error] [client 127.0.0.1] Premature end of 
script headers: mapserv
[Mon Oct 26 09:25:13 2009] [warn] [client 127.0.0.1] Timeout waiting for 
output from CGI script /var/www/cgi-bin/mapserv


If I try with the --reverse parameter, the same thing happens after a 
while, but at a different tile.

I have two questions:
1. Can I convince tilecache to skip the tiles it can't render, instead 
of dying?
    

Not build in, but you can certainly modify the client to catch errors and 
keep going.

  
2. What would be the necessary steps I need to take to troubleshoot this 
problem? (I am generating this cache from a mapserver which is getting 
its data from shapefiles).
    

Look in the apache logs for the mapserver, look at what the URL is, 
and send it to the mapserver. See if it fails in the same way. If so, it's 
a mapserver 'issue' (quotes because it may simply be taking too long to do
this tile, and the actual issue is that you need to bump up your apache
timeout), and can be treated externally to TileCache.

-- Chris

  
Thanks,
Adrian

_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
    

  


_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache