mapbox/tilemill — Issue #1035: Render dies when data source missing
Author: lxbarth
Created: 2011-12-20 16:10:52+00:00
State: open

I'm rendering (exporting) a map to MBTiles, when a data source is missing the export process gets stuck.

This is an example log: https://gist.github.com/1501937 - see how 140 errors are reported (Sqlite Plugin: ...), then progress is stuck.

I just did some digging with help from @yhahn, this is what we found out:

- `tilelive.copy()` calculates 27139 unites to be copied, [but only fails on 140 and doesn't succeed on any](https://github.com/mapbox/tilelive.js/blob/77a40d8a1d423a31fe638b4c46ccacdd28c220f0/lib/tilelive.js#L328).
- `tilelive.copy()` never triggers 'error' or 'finished' because [the copy queue's `empty` event is never triggered](https://github.com/mapbox/tilelive.js/blob/77a40d8a1d423a31fe638b4c46ccacdd28c220f0/lib/tilelive.js#L358).
- The `Step()` call in the queue [returns 140 times](https://github.com/mapbox/tilelive.js/blob/77a40d8a1d423a31fe638b4c46ccacdd28c220f0/lib/tilelive.js#L351)
- I can count [`MapnikSource.prototype.getTile()` invoked 240 times, but only returning 140 times with an error](https://github.com/mapbox/tilelive-mapnik/blob/f55624ea60464284f6be52e8346236c3a86751ac/lib/mapnik.js#L320)