apache / apache/openwhisk-deploy-kube
Request too large when create action
- Dominant language
- Shell
- Stars
- 309
- Forks
- 231
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I've found that OpenWhisk keep telling me the request size is too large when I try creating an action with zip file ~40MB large (base64 format will be ~52MB).
` wsk action create gmm --kind python:3 --main media_meta get-media-meta.zip -i -v`
The error looks like:
``` bash
REQUEST:
[PUT] https://127.0.0.1:31001/api/v1/namespaces/_/actions/gmm?overwrite=false
Req Headers
{
"Authorization": [
"Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
],
"Content-Type": [
"application/json"
],
"User-Agent": [
"OpenWhisk-CLI/1.0 (2021-04-01T23:49:54.523+0000) linux amd64"
]
}
Req Body
Body exceeds 1000 bytes and will be truncated
{"namespace":"_","name":"gmm","exec":{"kind":"python:3","code":"UEsDBBQAAAAIAJo1aFZyvYV4WwIAALgEAAAfABwAdmlydHVhbGVudi9iaW4vYWN0aXZhdGVfdGhpcy5weVVUCQAD5C4IZOQuCGR1eAsAAQToAwAABOgDAACdU02L2zAQvetXDNrDWjRxWlraYthDDgstlGUpuwslBKPY41itLRlJziaU/veOZDvxtvTSHCJpPt+8eeacrwuvDtIjHJT1vWxQH6AyForeWtQelPZoO4v0nzH26BDwiEViOtSJr5XLK9WgSC3KMhEL+HmdR0ueX2dw9v8SKWMP9IJCatgh9A5LeK5Rw8n00PbOBxOQE4/KeaX3cH/ytdHz/gvQxlPRF1h3Sq+6GJoyzjlTbWesB+Omm1Mez/eTY8zbU8aAfnI3oIMbCk876euUTOFMpiEEw2OBnYc72eKttcYOqVYqgrt2Dq1XRkdPwr/NZ/kvmgQXjNFIeansDBa9NAFIJsSC7aQLuMfQTQZLYiPh9OYClvBmC3AFzlvVgXyWp8gaOaGTRENlTRstE4gFdE3voin0A4cUJ72xjF0BkU9TlDHdG7hfP3yCOBNE8uhU2qkSzz0IEBaUfBKMBqAlKWv0hodEvr1MRU3S70bpZDNOsYVXcElI9+iTIWkBnIvUdY3yySVZvCz/9Pnrw+P6S3579xS7RIaIhFErEMRCWK3a155Wbw5/gA2jyrKc6wvG4i19CA4atbPSKnSBhRBVG1p1N8p0EFiLRS21ci0j1g457WRPdN5AWA6JL0IXLHxfVI14A56mK7q+fzeK+G36YRUUu+xk8UPu0WVDwL/c/G9aBoXGPV4URMJrorInQ2R+JH4R0BCdIS9UT4mHcJIrGfSHhSkx4b2vlh9JYKqijQA2btCLYNNsmyxQf37NSMjCds+O19nMtWUxP0DMyVyp41QjPtjlOq6V/QZQSwMEFAAAAAgA...
RESPONSE:Got response with code 500
Resp Headers
{
"Connection": [
"keep-alive"
],
"Content-Length": [
"17"
],
"Content-Type": [
"text/plain; charset=UTF-8"
],
"Date": [
"Wed, 08 Mar 2023 13:20:08 GMT"
],
"Server": [
"nginx/1.21.1"
]
}
Response body size is 17 bytes
Response body received:
Request too large
error: Unable to create action 'gmm': The connection failed, or timed out. (HTTP status code 500)
Run 'wsk --help' for usage.
```
The file size is as follows:
``` bash
$ ls -lh
total 46M
-rw-rw-r-- 1 ec2-user ec2-user 39M Mar 8 11:43 get-media-meta.zip
-rw-rw-r-- 1 ec2-user ec2-user 898 Mar 8 11:42 __main__.py
-rw-rw-r-- 1 ec2-user ec2-user 7.3M Mar 18 2019 mp4_test_yewen.mp4
-rw-rw-r-- 1 ec2-user ec2-user 19 Mar 7 08:40 requirements.txt
drwxrwxr-x 5 ec2-user ec2-user 77 Mar 8 06:44 virtualenv
$ base64 get-media-meta.zip > temp
$ ls -lh
total 98M
-rw-rw-r-- 1 ec2-user ec2-user 39M Mar 8 11:43 get-media-meta.zip
-rw-rw-r-- 1 ec2-user ec2-user 898 Mar 8 11:42 __main__.py
-rw-rw-r-- 1 ec2-user ec2-user 7.3M Mar 18 2019 mp4_test_yewen.mp4
-rw-rw-r-- 1 ec2-user ec2-user 19 Mar 7 08:40 requirements.txt
-rw-rw-r-- 1 ec2-user ec2-user 52M Mar 8 13:29 temp
drwxrwxr-x 5 ec2-user ec2-user 77 Mar 8 06:44 virtualenv
```
I've changed `nginx.ingress.kubernetes.io/proxy-body-size: "100m"` when deploying but it seems not solving the problem. Smaller size zip files are working fine, but I'm not so sure how can I use a larger file to create my actions?
Contributor guide
Research direction
Start with the `wsk action create` reproduction and the Kubernetes deployment configuration, including the `nginx.ingress.kubernetes.io/proxy-body-size` setting mentioned in the report. Trace the request-size handling across the ingress and OpenWhisk components; done means a roughly 40 MB action can be created successfully, with the relevant limit or configuration documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, nginx, shell
- Domain
- cloud, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100