NCC-CNC / wheretowork

Interactive application for systematic conservation planning
https://NCC-CNC.github.io/wheretowork
Other
8 stars 1 forks source link

Unspecified shapefile size limit and misformatted error message #283

Open shreeramsenthi opened 1 year ago

shreeramsenthi commented 1 year ago

Ran into an error trying to upload project data spanning Ontario at 1km resolution. The error message (screenshot below) appears in the file upload progress bar, but includes unformatted html tags and does not fit in the space.

image

Here is the rest of the text copied from the error message:

<html> <head><title>413 Request Entity Too Large</title></head> <body> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>nginx/1.18.0 (Ubuntu)</center> </body> </html> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page -->

(This was tested in Chrome in case that is relevant, happy to test in another browser.)

Based on the error, the file size appears to be the issue, but the shapefiles are cumulatively only ~150MB (largest individual file being 132MB). Would it be possible to increase this limit or do I have to switch over to raster data at this scale? Would it be possible to have a clearer indication of the file size limit and point users towards switching to raster data if this is a hard limit?

Attached is a zip of the inputs for if you would like to reproduce the error, created with v2.1 of PRZTools (not yet released).

Thanks as always!

DanWismer commented 1 year ago

The upload size is set to 1GB: https://github.com/NCC-CNC/wheretowork/blob/100895f32767d31f1d8d59c5d4656a8485debcfc/R/app_global.R#L13

We can always increase this, but realistically file size for the spatial upload should be relatively small. For example, our national 1km vector grid that covers all of Canada (over 11 million planning units) is ~1.8GB.

Sorry, I don't see the file attachment

DanWismer commented 1 year ago

@jeffreyhanson I am also wondering if we have to set something with the nginx: https://stackoverflow.com/questions/24306335/413-request-entity-too-large-file-upload-issue

jeffreyhanson commented 1 year ago

Yeah, this could be the source of the problem. Maybe try tweaking the nginx conf file and see if that fixes it?

shreeramsenthi commented 1 year ago

Sorry, was running into GitHub file size limits! Here's a download link, please note that it is ~90MB, and ~300MB unzipped https://s3.us-west-2.amazonaws.com/apexrms.com.public/Data/A287/EXPORT_WTW_Ontario.zip

DanWismer commented 1 year ago

Sorry, was running into GitHub file size limits! Here's a download link, please note that it is ~90MB, and ~300MB unzipped https://s3.us-west-2.amazonaws.com/apexrms.com.public/Data/A287/EXPORT_WTW_Ontario.zip

Thanks, got it!