We have a kubernetes cluster which has a dropwizard based web application running as a service. This application has a rest uri to upload files. It cannot upload files larger than 1MB. I get the following error:
ERROR [2017-07-27 13:32:47,629] io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a request: ea812501b414f0d9
! com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
! at [Source: <html>
! <head><title>413 Request Entity Too Large</title></head>
! <body bgcolor="white">
! <center><h1>413 Request Entity Too Large</h1></center>
! <hr><center>nginx/1.11.3</center>
! </body>
! </html>
I have tried the suggestions given in https://github.com/nginxinc/kubernetes-ingress/issues/21. I have edited the Ingress to set the proxy-body-size annotation. Also, I have tried using the configMap without any success. we are using kubernetes version 1.5. Please let me know if you need additional information.
Had this on my setup as well. Two advices here:
1: switch to official kubernetes nginx ingress, it's awesome (https://github.com/kubernetes/ingress-nginx)
2: with the above ingress, you can add an annotation to your Ingresses to controll body size limit on per ingress basis like this :
annotations:
ingress.kubernetes.io/proxy-body-size: 10m
works great
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With