apache / openwhisk-apigateway

Apache OpenWhisk API Gateway service for exposing actions as REST interfaces.
https://openwhisk.apache.org/
Apache License 2.0
64 stars 45 forks source link

Gateway imposes 10k limit on POST body #48

Closed starpit closed 7 years ago

starpit commented 7 years ago

POST bodies to an openwhisk gateway route are squashed for attachments larger than 10 kilobytes. There is no error, the payload is silently squashed. Worse, the entire payload is squashed if any part of it results in the payload as a whole exceeding 10 kilobytes.

The underlying OpenWhisk action is still invoked, but with an empty payload.

DavidMGreen commented 7 years ago

Thank you for bringing this to our attention, we are currently looking into a solution for this.

starpit commented 7 years ago

here is a test. if you run test.sh 5 you get a PASS (exit code 0), and if you run for any value greater than 10*1024, you get FAIL (exit code 1)

apigwtest.zip

alexsong93 commented 7 years ago

@starpit This was happening because the default in-memory buffer size for nginx is set to just 8K. I've increased the buffer size to 1M to fix the problem in the PR above.

starpit commented 7 years ago

thanks @alexsong93 for the quick fix!!

is the fix in production? [edit: never mind, i see the PR now :) ]

starpit commented 7 years ago

has this fix been promoted to production? i'm still seeing the >10k squashing effect. thanks

alexsong93 commented 7 years ago

@mhamann Have the new changes made their way to the prod/ys1 stacks?