Closed KlemenSpruk closed 8 years ago
reports a POSTGIS extension error
What is the error exactly?
Does anyone have any experience with mapnik and nodejs how to handle many concurrent requests on nodejs server with mapnik bindings???
The developers of https://github.com/cartodb/Windshaft might be able to help you. In general my first advise would be to increase the # of concurrent connections allowed by your database. I think Postgres defaults to 100.
'max_size' : 1,
The higher that number the better performance. I would increase to at least max_size = Number of CPUS.
The exact error is: Error: Postgis Plugin: Null connection
Make sure you are running the latest node-mapnik version so that you are not getting hit by https://github.com/mapnik/mapnik/issues/2725
Hello!
Thanks for advice. I increased the max_size parameter and number of postgres connections. That solved problems for my test case.
I use similar code from https://github.com/pocketIlmatto/mapnik_node_tile_server to generate tiles from a shapefile created by gdal_contour. Most of the contour lines are not rendered in the tiles and transparent areas are not created correctly. Here is shapefile drawn in QGIS and generated tiles in CesiumJS respectively.
UPD. The mapnik sample from node-mapnik also creates wrong png. Here is the source shape shapefile.tar.gz file
QGIS screenshot
CesiumJS screenshot
The reason was in mapnik style xml, I forgot tor remove this line
<PolygonSymbolizer fill="white" />
I' m running a script to get tiles from mapnik with nodejs server. I get tiles rendered on at a time. But we i request tiles from browser eg. on map page reload, the server reports a POSTGIS extension error. This probably happens when too many concurrent requests happens.
Does anyone have any experience with mapnik and nodejs how to handle many concurrent requests on nodejs server with mapnik bindings???
Thanks!
My script: