G
YouTube TikTok Games
Skip to content

Docker Compose limiting action size to 512KB? #124

Open

Description

@jthomas

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?

Activity

  1. matthewpflueger commented on May 16, 2018

    @matthewpflueger
    Contributor

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

  2. jthomas commented on May 21, 2018

    @jthomas
    MemberAuthor

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

  3. megawer commented on Oct 25, 2018

    @megawer

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

  4. ar-ramchandra commented on Nov 26, 2024

    @ar-ramchandra

    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)
    
  5. ar-ramchandra commented on Nov 26, 2024

    @ar-ramchandra

    @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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions