Loading of images is slow

Hello,

We are facing an issue with all the pictures of our app. When we load any page on the server (app.pathline.com), the pictures are loading very slowly (no matter the size of the picture).

Locally, we don’t have this problem when the image size is reasonable.

I put you there login to test it on your side :
User : demo@pathline.fr
Password : hello123

OS used : Mac (Browser : Chrome)

  • Database : PostgreSQL v12
  • Programming language : Node JS version 16.13.0 & React JS version 17.0.2
  • Dockerfile :
FROM node:16-alpine as build
ARG REACT_APP_API_URL
ENV REACT_APP_API_URL $REACT_APP_API_URL
ARG PUBLIC_URL
ENV PUBLIC_URL $PUBLIC_URL
WORKDIR /app
COPY ./client .

RUN npm install && npm run build

FROM nginx:latest
COPY --from=build /app/build /usr/share/nginx/html
COPY ./deployment/nginx-custom.conf /etc/nginx/conf.d/default.conf

EXPOSE 3000
CMD ["nginx", "-g", "daemon off;"]

@dandray can you show your ./deployment/nginx-custom.conf content file? I think your issue is coming from your configuration. Qovery does not interact with your file upload settings.

Hi @rophilogene,

Here is the file :

server {
    listen       3000;
    server_name  localhost;

    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
        try_files $uri /index.html;                 
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}

You can take a look at this tutorial on how to increase the max file size. What is your file size?

Hi @rophilogene,

I don’t think this is an issue of file size. Here we don’t try to make any upload, the images are already available on the server, and are displayed.
The issue we are facing is only on the time needed to load these images, that is different between our local and our server. The images are loading very slow on the server, even the lightest one (100Ko to 1mo).

Do you have an idea on this ?

Can you give more details on the performance issue? How do you measure?

What we measured is the time between the loading of the page, and the time the pictures take to load. When we opened the page, the images were loading in a second time, several seconds after (which is quite long for a user to wait, and looks like a bug).
I’ve just tested it again, apparently it does’nt happen each time.
We might see this with AWS to discover what is happening ?