Error uploading <file>. Try again

Hi,

I am having issues uploading files with more than 1MB size into a lilac deployment with tutor on k8s.

Here is what I get in studio:
image

Where can I find relevant logs? I am not sure what the problem is.

I followed steps in https://discuss.overhang.io/t/increase-upload-size/ but it didn’t help (i.e. modifying MAX_ASSET_UPLOAD_FILE_SIZE_IN_MB or client_max_body_size).

Many thanks,
Sebastian

This is where I found the error message in the source code: studio-frontend/displayMessages.jsx at master · edx/studio-frontend · GitHub

I had no trouble uploading a 2 MB file to Sign in or Register | Open edX Demo Site (which is not hosted on Kubernetes).

Are you quite sure that your k8s proxy is not limiting the maximum upload size? What is the response from the server? Does it ever reach the nginx container?

Many thanks @regis

Indeed, a test deployment with docker was working for me as well out of the box.

You were right, the problem was with the default file upload limit on the ingress controller. Here are some references:

I had to add the following annotations to the ingress controller to make it work:

    nginx.ingress.kubernetes.io/proxy-body-size: "50m"
    nginx.org/client-max-body-size: "50m"

So finally:

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: ingress-test
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/proxy-body-size: "50m"
    nginx.org/client-max-body-size: "50m"
  namespace: openedx

Many thanks,
Sebastian

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.