Reputation: 103
I had deployed an application on EKS, and tried two ways of exposing it for traffic. though ingress is a better approach, I also tried directly exposing the application through a LB.
Load Balancer: When I exposed a service directly through a load balancer, it was unable to receive file sizes greater then 20MB, I was having trouble finding out a way to configure the loadbalancer or the kubernetes service to accept a file of that size. I was always getting "413 Request Entity Too Large Error". Is there a way to configure the LB to accept file sizes more than a specific limit?
Using ingress through nginx-ingress: I was able to configure nginx-ingress to accept file size greater than 25 MB and my application was working properly.
Upvotes: 4
Views: 3587
Reputation: 97
In my case we were using Hapi server(similar to express servers) behind an ALB. we were getting
'statusCode: 413 Request Entity Too Large. Payload content length greater than maximum allowed: 5000000'
Initially we thought it was because of the ALB payload size restriction but it turned out that our server was configured to reject requests with payload greater than 5MB. So we increased the "maxBytes" key in the server configuration and it started working. So I would suggest to look into the server config.
Upvotes: 0