[ka-Map-users] Error with precache
Bob.Bistrais at maine.gov
Thu Dec 10 13:41:40 EST 2009
OK, I think we're making some progress here. I'll need to look into the
precache.php in depth, but that makes sense.
From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com]
Sent: Tuesday, December 08, 2009 1:56 PM
To: Bistrais, Bob
Cc: ka-map-users at lists.maptools.org ML
Subject: Re: [ka-Map-users] Error with precache
Bistrais, Bob wrote:
> Hi again,
> Well, I was able to create and save a file with Notepad, but I do
> think probably right, with respect to it being out of file handles.
> Do you have any code or advice on how you modified the precache.php
The code was done on a clients system and I'm not seeing an archived
copy here. But if you look at the code for precache is is just a series
of loop something like:
for each mapfile
for each group
for each row of metatiles
for each metatile in the row
make metatile image
chop image into tiles
I added arguments for -rs <num> -re <num> to enter row start and row end
numbers. And then modified the parameters driving the "for each row of
metatiles" to take the defaults computed or to use my args if present.
I think I also added a -dryrun option to compute all the stats about the
run without actually generating any tiles.
Then I could run the dryrun, look at the number of rows. Create a batch
precache -rs 0 -re 9 ...
precache -rs 10 -re 19 ...
precache -rs 20 -re 29 ...
I think I probably added controls to select a single zoom level to
process also. It was pretty flexible with lots of options. The idea was
to break the precache effort into a bunch of smaller manageable jobs any
of which could be repeated without rerunning the WHOLE job from the
> -----Original Message-----
> From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com]
> Sent: Monday, December 07, 2009 3:52 PM
> To: Bistrais, Bob
> Cc: ka-map-users at lists.maptools.org
> Subject: Re: [ka-Map-users] Error with precache
> Bistrais, Bob wrote:
>> Thanks Steve. I should've mentioned, though, I'm on a Windows server
>> and don't have the touch command available.
> Just try to create a simple file with notepad and save it there will
> do the same thing. All the test does is validate that you can actually
> create additional files there or not.
> I'm guessing that you are probably running into the later problem that
> I mentioned if you are trying to tile a large areas or lots of tiles
> in a single command.
>> -----Original Message-----
>> From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com]
>> Sent: Monday, December 07, 2009 11:39 AM
>> To: Bistrais, Bob
>> Cc: ka-map-users at lists.maptools.org
>> Subject: Re: [ka-Map-users] Error with precache
>> Bistrais, Bob wrote:
>>> I am trying to build precached tiles for several ka-map
>>> For the most part it has gone well, but for some scales I am getting
>>> error messages. The precache.php program appears to run well, then
>>> get the following:
>>> 199080 errors encountered
>>> Report [a]ll, [l]ast, [n]one?
>>> So if I report the last error, the message is:
>>> Failed to open stream http://localhost/.../tile.php
>>> There is plenty of disk storage space available and I don't think
>>> overstressing the server. What does this error mean, and how do I
>>> get around it?
>> 1) Check that you have not run out of inodes on the disk.
>> cd /path/to/cache
>> touch junk # if this fails you have run out of inodes
>> rm junk
>> while df might report that there is still space on the disk, if you
>> not have anymore inodes then you can not allocate that space for
>> and your disk is full regardless of space.
>> 2) A few years ago when I was using precache.php, there were problems
>> with it leaking file some kind of resource that was file related, may
>> be file handles. Anyway I could not figure it out and change my
>> strategy to tile a few rows, then exit and then ran it for each set
>> rows needed until it was done. This allow the precache.php to run
>> exit before it had problems and allow me to continue processing
>> without having to restart from the beginning. I think I probably had
>> to change the script to make it do that.
>> Hope this helps,
>> -Steve W
More information about the ka-Map-users