tilemill-project / tilemill

TileMill is a modern map design studio
https://tilemill-project.github.io/tilemill/
BSD 3-Clause "New" or "Revised" License
3.12k stars 528 forks source link

Invalid width for image dimensions requested #2635

Closed IReese closed 5 years ago

IReese commented 5 years ago

I recently had to reinstall Tilemill on my Ubuntu 16.04 machine. I had to make upgrade my node and nodejs versions to be compatible with some newer software i was running. When I updated node and nodejs, Tilemill would no longer launch using the terminal command:

./index.js

I reinstalled Tilemill using the standard install with one modification:

git clone https://github.com/tilemill-project/tilemill.git
cd tilemill/
nvm use 4.9.1
npm install

The install works, Tilemill is running,however when I am using Tilemill, I get an error when trying to load large rasters (>10GB) or vrts.

Three scenarios happen when I attempt to load a large raster:

  1. Zoom 0-8. Error message: Message: console message: http://127.0.0.1:20009/assets/bones/all.js @5571: Invalid width for image dimensions requested
  2. Zoom 9-11. My memory maxes out, switchs to swap, hangs my machine, then kills Tilemill with SIGKILL. Curiously, the swap does not clear after Tilemill fails
  3. Zoom 12-20. Raster loads normally with NO errors and works fine.

I've tried a number of solutions so far but none have worked:

  1. Increasing node memory limits: NODE_OPTIONS="--max_old_space_size=8192" nvm run 4.9.1 ./index.js
  2. Different versions of node for the install and running of Tilemill
  3. Source builds for Mapnik (Mapnik 3.0.12) and Mapnik Python

See successful installation process with source builds here: https://gist.github.com/IReese/7820ebf65e41335beaccd613ab752404

I am at a loss of what to do anymore. It seems like it is a memory issue. I never had this problem before and Tilemill ran seamlessly until recently.

Any ideas where to go next?

IReese commented 5 years ago

Resolved. At least on our end.

Under dependencies in the package.json, I updated the mapnik version to instead use "mapnik": "~3.7.2" ' before I installed.

Then I installed Tilemill using node4.9.1

nvm use 4.9.1
npm install
IReese commented 5 years ago

Looks like this was in issue a while back in Mapnik:

https://github.com/mapnik/mapnik/issues/3822 https://github.com/mapnik/mapnik/pull/3872

but resolved in Mapnik v3.7.2