After updating to the version 23 from 22 I started getting the error: Could not load comments. 520

So I used this mainly for the wiki function that I used for a personal work wiki and it ran perfectly for 2 or 3 months until I decided to update from version 22.x to 23.2 in November of last year when the AI feature came out and i want to see how it worked and it after updating I imedeately started getting this errors and the knowledge base articles sometimes fail to load and only load after the 2 or 3 try.

I suspect the new version requires a different nginx config but I can't figure it out.
At that time I only used one custom line in my Nginx Reverse Proxy Manager config, with ssl certificate from cloudflare:
real_ip_header CF-Connecting-IP;

This week i even rebuild everything from scratch and realized that only after proxying it did it start having the same issues, so im sure its something with the reverse proxy but I need some help with it.
I followed the info in the install guide and added everything to the config.

Youtrack version: 2023.3.24329
System OS: Unraid Docker
Current nginx config is:



real_ip_header CF-Connecting-IP;
add_header Access-Control-Request-Method '*';
add_header Access-Control-Request-Headers '*';
add_header Access-Control-Allow-Origin '*';
add_header Access-Control-Allow-Credentials '*';
add_header Access-Control-Expose-Headers '*';
add_header Access-Control-Max-Age '*';
add_header Access-Control-Allow-Methods '*';
add_header Access-Control-Allow-Headers '*';
location /contextPath {
       proxy_set_header X-Forwarded-Host $http_host;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto $scheme;

       proxy_buffers 8 64k;
       proxy_busy_buffers_size 128k;
       proxy_buffer_size 64k;

       client_max_body_size 10m;

       proxy_http_version 1.1;
       proxy_pass http://192.168.1.77:8766/contextPath;
   }
location /contextPath/api/eventSourceBus {
       proxy_cache off;
       proxy_buffering off;
       proxy_read_timeout 86400s;
       proxy_send_timeout 86400s;
       proxy_set_header Connection '';
       chunked_transfer_encoding off;

       proxy_set_header X-Forwarded-Host $http_host;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_http_version 1.1;
       proxy_pass http://192.168.1.77:8766/contextPath/api/eventSourceBus;
   }

Thanks for any help.

0
3 comments
Official comment

Hi! Yes, this issue is most often connected to the outdated Nginx versions. 

If anyone else is facing similar problems and happens to find this thread, please try upgrading Nginx to 1.20 or higher. 

Hi!

I'm Sergey from the YouTrack team.

This indeed indicates an issue with the reverse proxy configuration rather than an application problem. What's your nginx version? 

1

Hi, turns out the nginx reverse proxy I was using is from 2021, it didn't update because it was using that specific tag, just updated it to the most recent one and all of the problems are gone, I was almost sure this wasn't  a config problem but I lost days trying to fix it and it turns out it was just something outdated.

Thanks for the help.

0

Please sign in to leave a comment.