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

PostGIS source returns a string-only error on request cancellation #42

Open
jerluc opened this issue Feb 3, 2021 · 0 comments
Open
Labels
bug Something isn't working source:postgis Relating to the PostGIS backend source

Comments

@jerluc
Copy link
Member

jerluc commented Feb 3, 2021

When a request is cancelled for a PostGIS-backed layer, this unexpectedly results in a 500 error being returned:

ERRO[0017] Tile request failed: pq: canceling statement due to user request (HTTP error 500)

Upon further investigation, it appears that the PostgreSQL library we use returns the opaque error string pq: canceling statement due to user request when a request is cancelled (e.g. when panning around quickly on the map), which is incorrectly being handled as an unexpected server error (500 error code).

While this is currently not impacting end use in map interfaces (since when a browser cancels a request, it discards/closes its receive socket), this is clearly bypassing some code that was written specifically to handle request cancellations which in turn may impact:

@jerluc jerluc added the bug Something isn't working label Feb 3, 2021
@jerluc jerluc added the source:postgis Relating to the PostGIS backend source label Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working source:postgis Relating to the PostGIS backend source
Projects
None yet
Development

No branches or pull requests

1 participant