-
Notifications
You must be signed in to change notification settings - Fork 1
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
requesting all glaciers kills the server #64
Comments
Playing with this request, the precision can be reduced to get more features but the web server still kills pgfs at about 8700 features. Not sure if there is a workaround other than upping the resources for the web server (or setting |
Note that requesting the entire collection |
A reprex using fwapgr library(fwapgr)
library(tibble)
fwa_query_collection("whse_basemapping.fwa_glaciers_poly", limit = 4000, nocache = TRUE)
#> Simple feature collection with 4000 features and 24 fields
#> Geometry type: MULTIPOLYGON
#> Dimension: XY
#> Bounding box: xmin: -138.9438 ymin: 49 xmax: -115.0322 ymax: 60
#> Geodetic CRS: WGS 84
#> # A data frame: 4,000 × 25
#> area_ha blue_line…¹ featu…² fwa_w…³ gnis_…⁴ gnis_…⁵ gnis_…⁶ gnis_…⁷ gnis_…⁸
#> * <dbl> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 0.0000479 <NA> GD1230… <NA> <NA> <NA> <NA> <NA> <NA>
#> 2 0.0000466 <NA> GD1230… <NA> <NA> <NA> <NA> <NA> <NA>
#> 3 0.0000416 <NA> GD1230… <NA> <NA> <NA> <NA> <NA> <NA>
#> 4 0.0000403 <NA> GD1230… <NA> <NA> <NA> <NA> <NA> <NA>
#> 5 0.0000378 <NA> GD1230… <NA> <NA> <NA> <NA> <NA> <NA>
#> 6 0.0000378 <NA> GD1230… <NA> <NA> <NA> <NA> <NA> <NA>
#> 7 0.0000328 <NA> GD1230… <NA> <NA> <NA> <NA> <NA> <NA>
#> 8 0.0000327 <NA> GD1230… <NA> <NA> <NA> <NA> <NA> <NA>
#> 9 0.0000239 <NA> GD1230… <NA> <NA> <NA> <NA> <NA> <NA>
#> 10 0.0000239 <NA> GD1230… <NA> <NA> <NA> <NA> <NA> <NA>
#> # … with 3,990 more rows, 16 more variables: gnis_name_3 <chr>,
#> # left_right_tributary <chr>, local_watershed_code <chr>,
#> # localcode_ltree <chr>, waterbody_key <chr>, waterbody_key_50k <chr>,
#> # waterbody_key_group_code_50k <chr>, waterbody_poly_id <dbl>,
#> # waterbody_type <chr>, watershed_code_50k <chr>, watershed_group_code <chr>,
#> # watershed_group_code_50k <chr>, watershed_group_id <dbl>,
#> # watershed_key <chr>, wscode_ltree <chr>, geometry <MULTIPOLYGON [°]>, and …
fwa_query_collection("whse_basemapping.fwa_glaciers_poly", limit = 8000, nocache = TRUE)
#> Error in `get_request()` at pgfeatureserv/R/collection-features.R:73:2:
#> ! API request failed [502]: <html>
#> <head><title>502 Bad Gateway</title></head>
#> <body>
#> <center><h1>502 Bad Gateway</h1></center>
#> <hr><center>nginx/1.18.0 (Ubuntu)</center>
#> </body>
#> </html>
#> .
#> Backtrace:
#> ▆
#> 1. └─fwapgr::fwa_query_collection(...)
#> 2. └─pgfeatureserv::pgf_collection_features(...) at fwapgr/R/query-collection.R:35:2
#> 3. └─pgfeatureserv:::get_request(url = url, user = user, verbose = verbose) at pgfeatureserv/R/collection-features.R:73:2
#> 4. └─pgfeatureserv:::chk_response_status(resp) at pgfeatureserv/R/get.R:13:2
#> 5. └─chk::abort_chk(glue("API request failed [{cd}]: {msg}")) at pgfeatureserv/R/chk.R:7:2
#> 6. └─chk::err(..., n = n, tidy = tidy, .subclass = "chk_error", call = call)
#> 7. └─rlang::abort(msg, class = .subclass, !!!args[named], call = call) Created on 2022-11-27 with reprex v2.0.2 |
FYI, I've filed this CrunchyData/pg_featureserv#129 But bumping up the web server resources just a bit will fix the issue, I might go ahead with that. |
Bumped to 2G of memory, looks good to me. |
Yes |
And can query up to the full 10000. |
Not an issue with
fwapgr
but I'll file this here for now, from pgfs log:The text was updated successfully, but these errors were encountered: