Don't Cache Empty Json or PNG

21 views
Skip to first unread message

Alex King

unread,
Mar 2, 2017, 2:53:59 PM3/2/17
to Tilestache
Hey,

I'm running into file system errors because TileStache is generating a ton of empty json/png files and storing them. It looks like there's a class (NoTileLeftBehind) to prevent storing empty files but how do I go about calling this? Do I need to build a custom provider? Is it as simple as a flag?

Thanks,
Alex

Alex King

unread,
Mar 2, 2017, 6:30:46 PM3/2/17
to Tilestache
So, it looks like the intent of NoTileLeftBehind was to only tile within a bounding box, but not to exclude empty tiles within that bounding box. I ended up just writing a very hacky test to determine whether either the png or the json was blank and then raising NoTileLeftBehind if either was true. Not sure if there's a better way, but it works for now.

Travis Kirstine

unread,
Mar 7, 2017, 10:28:45 AM3/7/17
to tiles...@googlegroups.com

Alex,

 

The issue with not caching tiles is that tilestache would need to reach back to the source wms / database to regenerate a empty png / json repeatly for the same request, this somewhat defeats the purpose of a cache.   

 

On some system the blank redundancy is handled by using symbolic links

 

I see this issue has been raised here but I’m not sure if it has been implemented

https://github.com/TileStache/TileStache/issues/189

--
You received this message because you are subscribed to the Google Groups "Tilestache" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tilestache+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex King

unread,
Mar 8, 2017, 8:47:30 PM3/8/17
to tiles...@googlegroups.com
Thanks for the response, Travis. The reason it's necessary for me is because when caching a large number of tiles I run into inode capacity issues. That said, I'm looking into whether or not it would just be better to pre-cache everything with MBTiles and serve that. Do you have any thoughts on the MBTiles format vs just zipped pngs?

To unsubscribe from this group and stop receiving emails from it, send an email to tilestache+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Tilestache" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tilestache/TA2zptWRdXQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tilestache+unsubscribe@googlegroups.com.

Travis Kirstine

unread,
Mar 10, 2017, 8:32:05 AM3/10/17
to tiles...@googlegroups.com

If you have a lot of tiles I would go with MBTiles, disk cache become somewhat problematic to manage (backup / cp).  The issue with MBTiles is that it (sqlite) doesn’t handle concurrent writes (locks table). 

 

 

From: tiles...@googlegroups.com [mailto:tiles...@googlegroups.com] On Behalf Of Alex King
Sent: March-08-17 8:47 PM
To: tiles...@googlegroups.com
Subject: Re: [tilestache] Re: Don't Cache Empty Json or PNG

 

Thanks for the response, Travis. The reason it's necessary for me is because when caching a large number of tiles I run into inode capacity issues. That said, I'm looking into whether or not it would just be better to pre-cache everything with MBTiles and serve that. Do you have any thoughts on the MBTiles format vs just zipped pngs?

On Tue, Mar 7, 2017 at 10:28 AM, Travis Kirstine <tkir...@firstbasesolutions.com> wrote:

Alex,

 

The issue with not caching tiles is that tilestache would need to reach back to the source wms / database to regenerate a empty png / json repeatly for the same request, this somewhat defeats the purpose of a cache.   

 

On some system the blank redundancy is handled by using symbolic links

 

I see this issue has been raised here but I’m not sure if it has been implemented

https://github.com/TileStache/TileStache/issues/189

 

From: tiles...@googlegroups.com [mailto:tiles...@googlegroups.com] On Behalf Of Alex King
Sent: March-02-17 6:31 PM
To: Tilestache <tiles...@googlegroups.com>
Subject: [tilestache] Re: Don't Cache Empty Json or PNG

 

So, it looks like the intent of NoTileLeftBehind was to only tile within a bounding box, but not to exclude empty tiles within that bounding box. I ended up just writing a very hacky test to determine whether either the png or the json was blank and then raising NoTileLeftBehind if either was true. Not sure if there's a better way, but it works for now.

On Thursday, March 2, 2017 at 2:53:59 PM UTC-5, Alex King wrote:

Hey,

 

I'm running into file system errors because TileStache is generating a ton of empty json/png files and storing them. It looks like there's a class (NoTileLeftBehind) to prevent storing empty files but how do I go about calling this? Do I need to build a custom provider? Is it as simple as a flag?

 

Thanks,

Alex

--

You received this message because you are subscribed to the Google Groups "Tilestache" group.

To unsubscribe from this group and stop receiving emails from it, send an email to tilestache+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Tilestache" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tilestache/TA2zptWRdXQ/unsubscribe.

To unsubscribe from this group and all its topics, send an email to tilestache+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

 

--

You received this message because you are subscribed to the Google Groups "Tilestache" group.

To unsubscribe from this group and stop receiving emails from it, send an email to tilestache+...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages