whole-tale / terraform_deployment

Terraform deployment setup for WT prod
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Can't upload large file #34

Closed craig-willis closed 5 years ago

craig-willis commented 6 years ago

Confirming Niall's report that I can't upload large files (e.g., 200MB).

Dev console reports

https://girder.stage.wholetale.org/api/v1/file/chunk

  "field": "id",
    "message": "Invalid ObjectId: chunk",
    "type": "validation"

with error net::ERR_FAILED

craig-willis commented 5 years ago

Trying to upload via curl suggests this might be a cherrypy configuration:

curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' --header 'Girder-Token:TOKEN' -d 'uploadId=Id&offset=0' 'https://girder.stage.wholetale.org/api/v1/file/chunk' --data-binary @large-file.dat -v 

...
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 413
< content-type: text/plain
< content-length: 67
< date: Fri, 20 Jul 2018 09:28:49 GMT
* HTTP error before end of send, stop sending
<
* Connection #0 to host girder.stage.wholetale.org left intact
The entity sent with the request exceeds the maximum allowed bytes

It looks like the default max_request_body_size is 100M https://github.com/cherrypy/cherrypy/blob/46aa2267136763ecae8d4997b0f9bfc0e04b5176/cherrypy/_cpserver.py#L92

craig-willis commented 5 years ago

Tried changing config via girder.local.cfg:

[global]
...
server.max_request_body_size = 1073741824

But still seeing the 413. @Xarthisius is this the right way to override cherrypy configuration options in Girder?

craig-willis commented 5 years ago

Moved to dashboard https://github.com/whole-tale/dashboard/issues/228