Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapnik (OGR) fails silently giving an empty tile in case of network outage and/or SQL server is unreachable #43

Open
saurabhpandit opened this issue Jun 3, 2015 · 6 comments

Comments

@saurabhpandit
Copy link

I am having problem with OGR plugin. mapnik.load_map is a blocking statement and it throws error if SQL server is unreachable but where as mapnik.render fails silently
so I get an empty tile instead of some sort of exception
any idea how I can make sure that either tile gets rendered properly or it throws an error

@springmeyer
Copy link
Member

Hi @saurabhpandit - I'm not sure why the failure during rendering is silent. But I agree with you that it should not be silent. I suspect fixing this will requiring testing changes to the Mapnik OGR plugin. As a first step I would recommend building Mapnik in DEBUG mode and then seeing if this code is triggered: https://github.com/mapnik/mapnik/blob/master/plugins/input/ogr/ogr_layer_ptr.hpp#L171-L187. It may be that the OGR plugin needs to start checking more OGR error codes.

Let me know if that helps and you are able to rebuild Mapnik in Debug mode.

@saurabhpandit
Copy link
Author

My mapnik is built with debug mode but it does not print any of the above debug statements.

@saurabhpandit
Copy link
Author

But I can tell you that other debug statements are being printed.

@springmeyer
Copy link
Member

@saurabhpandit - sorry, try passing ./configure ENABLE_LOG=True DEBUG=True

@saurabhpandit
Copy link
Author

Yep. We have configured mapnik with ENABLE_LOG=True DEBUG=True since we compiled it first time.

@springmeyer
Copy link
Member

Okay, then the issue is likely that you need to change the "severity" to get DEBUG level to show up. See https://github.com/mapnik/mapnik/wiki/Logging. The other quick workaround would be to do: https://gist.github.com/springmeyer/92386296c2f1addfa69c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants