net::ERR_CONNECTION_RESET Managed Kubernetes Digital Ocean Large Payloads

6/26/2019

I have created a Digital Ocean managed Kubernetes cluster following this tutorial very closely. https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes

Everything is near identical except my custom basic node server container. Furthermore, the cluster works flawlessly until posting a large (>~400Kbs) file/payload to ANY endpoint.

Obviously, I attempted to create this issue running my container outside of Kubernetes and I could not reproduce it at any file size. I also verified that all of my droplets weren't running out of resources. CPU and memory usage were low.

I have seen a few similar issues online with my struggle to find a solution. (ie https://kubernetes.io/blog/2019/03/29/kube-proxy-subtleties-debugging-an-intermittent-connection-reset/)

I have attempted to apply this DaemonSet and it did not fix the problem.

Has anybody else ran into this issue or found a solution? I tremendously appreciate any help.

Thank you!

UPDATE: I have tested server with kubectl port-forward and the upload worked correctly. I imagine that would mean it is any issue with my ingress or load balancer. I am still searching for answers.

-- Joseph Horsch
digital-ocean
kubernetes

1 Answer

6/26/2019

So, I finally got it! The solution is configuring the proxy body size nginx.ingress.kubernetes.io/proxy-body-size: "50m" as stated here: 413 error with Kubernetes and Nginx ingress controller

Hopefully this can help someone with intermittent connection reset issues on uploads in the future :)

-- Joseph Horsch
Source: StackOverflow