clearml icon indicating copy to clipboard operation
clearml copied to clipboard

413 Request Entity Too Large

Open davidenitti opened this issue 2 years ago • 10 comments

when I try to log an image I get this error:

clearml.metrics - WARNING - Failed uploading to
[...]
<html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>

I assume it's because the image is too big, how can I fix the issue? I want to upload high-res images

davidenitti avatar Mar 14 '22 09:03 davidenitti

Hi @davidenitti,

What ClearML Server are you using? Also, how bug is the typical image?

jkhenning avatar Mar 15 '22 09:03 jkhenning

I'm using the self-hosted clearml server, the image is around 3000x4000

davidenitti avatar Mar 16 '22 13:03 davidenitti

I think this can be controlled using the nginx client_max_body_size 0; setting - that would require changing the nginx configuration (so basically a rebuild of the docker)

jkhenning avatar Mar 17 '22 09:03 jkhenning

I'm assuming you're using the built-in fileserver, right? What's the URL configured to it in your clearml.conf?

jkhenning avatar Mar 17 '22 09:03 jkhenning

thanks I fixed it with your suggestion

davidenitti avatar Mar 17 '22 14:03 davidenitti

Is it something you can do a PR on? 🙂

jkhenning avatar Mar 17 '22 14:03 jkhenning

Hi, In fact, the problem was solved by adding the annotation nginx.ingress.kubernetes.io/proxy-body-size=50m at the level of the ingress files. Adding annotations is already supported in the helm chart.

AndolsiZied avatar Mar 17 '22 14:03 AndolsiZied

I think it might be worthwhile having as a default in the helm chart, perhaps with the value 0 (unlimited) - WDYT?

jkhenning avatar Mar 17 '22 14:03 jkhenning

I agree with you there is no point in puttin restriction on upload size. So we can put unlimited by default.

AndolsiZied avatar Mar 17 '22 15:03 AndolsiZied

As the web application deployed in a nginx server and the service is behind an ingress, we have to put client_max_body_size 0; in two places :

  1. in the config map used by the nginx-controller as described [here](client_max_body_size 0;).
  2. in the /etc/nginx/nginx.conf of the web server.

AndolsiZied avatar Mar 17 '22 17:03 AndolsiZied