Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

504 Gateway Timeout when importing bookmarks #1910

Closed
juanico10 opened this issue Nov 16, 2022 · 3 comments · Fixed by #1938
Closed

504 Gateway Timeout when importing bookmarks #1910

juanico10 opened this issue Nov 16, 2022 · 3 comments · Fixed by #1938
Labels
bug it's broken! documentation performance proxy hosting behind reverse proxies

Comments

@juanico10
Copy link

Hello,

I have detected a lack of configuration in nginx.
When loading a lot of bookmarks, nginx stops responding and plays error: 504 Gateway Timeout.

I have solved it by adding inside the server in the file /etc/nginx/nginx.conf:

server {
    # Buffer configuration
    client_header_buffer_size 8k;
    large_client_header_buffers 4 32k;
    client_body_buffer_size 32K;
    keepalive_timeout 60;
    send_timeout 60;

    # timeout for reading a response
    proxy_read_timeout 600;
    proxy_connect_timeout 600;
    proxy_send_timeout 600; 
}

Best regards, Juan

@nodiscc
Copy link
Member

nodiscc commented Nov 17, 2022

loading a lot of bookmarks

  • How many bookmarks?
  • Do you mean importing bookmarks from a bookmarks.html file? Or just displaying them in Shaarli?

(This may be similar to #1854, optional timeout settings should probably be documented in https://shaarli.readthedocs.io/en/master/Reverse-proxy/)

@nodiscc nodiscc added bug it's broken! documentation proxy hosting behind reverse proxies performance labels Nov 17, 2022
@nodiscc nodiscc added this to the backlog to the future milestone Nov 17, 2022
@juanico10
Copy link
Author

Hi!

  • I have loaded about 200 or so.
  • I import the bookmarks from a bookmarks.html file.
    Best regards.

@nodiscc nodiscc changed the title 504 Gateway Timeout shaarli 504 Gateway Timeout when importing bookmarks Dec 4, 2022
nodiscc added a commit to nodiscc/Shaarli that referenced this issue Jan 31, 2023
nodiscc added a commit to nodiscc/Shaarli that referenced this issue Feb 19, 2023
@nodiscc
Copy link
Member

nodiscc commented Mar 1, 2023

Thanks for letting us know. I've added a hint that reverse proxy timeout settings might need to be adjusted for long-lasting operations (like importing a lot of bookmarks) in https://github.com/shaarli/Shaarli/pull/1938/files. Feel free to send a patch to improve the nginx-specific documentation in https://github.com/shaarli/Shaarli/blob/master/doc/md/Reverse-proxy.md#nginx.

By the way 200 bookmarks is not that many. By chance, is this on low-powered hardware/ARM board? That would explain why you're hitting the timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug it's broken! documentation performance proxy hosting behind reverse proxies
Projects
None yet
2 participants