Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Docker Compose limiting action size to 512KB? #124

Open
jthomas opened this issue May 14, 2018 · 5 comments
Open

Docker Compose limiting action size to 512KB? #124

jthomas opened this issue May 14, 2018 · 5 comments

Comments

@jthomas
Copy link
Member

jthomas commented May 14, 2018

User has reported an issue deploying larger actions with error returned: 413 Request Entity Too Large.

I've started devtools using docker compose and can reproduce the issue using the following command.

mkfile -n 512k source.js; ls -lh source.js; wsk action create test --kind nodejs:6 source.js -v

This is the response body from the CLI command.

<html>
<head><title>413 Request Entity Too Large</title></head>
<body bgcolor="white">
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>openresty/1.13.6.1</center>
</body>
</html>

Using a file with less than 512KB doesn't have this issue, e.g. mkfile -n 511k. Looks like the default body size configuration from nginx in the api gateway service could be set as 512k?
https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

If this is correct, can we update it to be the same as the maximum file size (48MB) for actions?

@matthewpflueger
Copy link
Contributor

Any workaround for this? This issue prevents me from using openwhisk locally...

@jthomas
Copy link
Member Author

jthomas commented May 21, 2018

@matthewpflueger Have you tried setting that configuration value for NGINX to a higher default and seeing if that helps?

@megawer
Copy link

megawer commented Oct 25, 2018

Is there an update on this issue? I am facing the same and can't resolve it...

@ar-ramchandra
Copy link

not sure if this helps but, updating nginx to accept larger files causes the controller to throw 500 internal server errors:

any help is deeply appreciated.

[2024-11-26T16:51:23.977Z] [ERROR] Error during processing of request: 'Request too large: Request of size 75724088 was longer than the maximum of 52428800'. Completing with 500 Internal Server Error response. To change default exception handling behavior, provide a custom ExceptionHandler.
akka.http.scaladsl.model.EntityStreamException: Request too large: Request of size 75724088 was longer than the maximum of 52428800
	at akka.http.scaladsl.model.HttpEntity.toStrict(HttpEntity.scala:89)
	at akka.http.scaladsl.model.HttpEntity.toStrict$(HttpEntity.scala:87)
	at akka.http.scaladsl.model.HttpEntity$Default.toStrict(HttpEntity.scala:370)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$toStrictEntity$3(BasicDirectives.scala:400)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$2030/00000000F41C2360.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$945/000000006218CA10.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResult$2(BasicDirectives.scala:68)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$1964/00000000F00BE940.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResultWith$2(BasicDirectives.scala:74)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$1949/00000000F00BA250.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$945/000000006218CA10.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRequestContext$2(BasicDirectives.scala:45)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$2016/00000000F00ECEB0.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResult$2(BasicDirectives.scala:68)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$1964/00000000F00BE940.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$945/000000006218CA10.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$945/000000006218CA10.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResult$2(BasicDirectives.scala:68)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$1964/00000000F00BE940.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$945/000000006218CA10.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$945/000000006218CA10.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResultWith$2(BasicDirectives.scala:74)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$1949/00000000F00BA250.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$945/000000006218CA10.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.ExecutionDirectives.$anonfun$handleExceptions$2(ExecutionDirectives.scala:32)
	at akka.http.scaladsl.server.directives.ExecutionDirectives$$Lambda$1939/00000000F4186390.apply(Unknown Source)
	at akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:161)
	at akka.http.scaladsl.server.directives.BasicDirectives$$Lambda$945/000000006218CA10.apply(Unknown Source)
	at akka.http.scaladsl.server.Route$.$anonfun$asyncHandler$1(Route.scala:86)
	at akka.http.scaladsl.server.Route$$$Lambda$1866/0000000062BC9590.apply(Unknown Source)
	at akka.stream.impl.fusing.MapAsyncUnordered$$anon$31.onPush(Ops.scala:1376)
	at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:523)
	at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:409)
	at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:606)
	at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:485)
	at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:581)
	at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:749)
	at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:764)
	at akka.actor.Actor.aroundReceive(Actor.scala:539)
	at akka.actor.Actor.aroundReceive$(Actor.scala:537)
	at akka.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:671)
	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:612)
	at akka.actor.ActorCell.invoke(ActorCell.scala:581)
	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:268)
	at akka.dispatch.Mailbox.run(Mailbox.scala:229)
	at akka.dispatch.Mailbox.exec(Mailbox.scala:241)
	at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
	at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
	at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
	at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

@ar-ramchandra
Copy link

@matthewpflueger Have you tried setting that configuration value for NGINX to a higher default and seeing if that helps?

Yes, doing so throws Completing with 500 Internal Server Error response

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants