Loading home page when authenticated takes 5 minutes and 40 seconds #2051

Closed
opened 2025-11-02 04:22:24 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @asonix on GitHub (Jul 12, 2018).

  • Gitea version: 1.5 (also 1.4.2)
  • Git version: 2.17.1
  • Operating system: Ubuntu 18.04 LTS on a Raspberry Pi 2 (armv7h)
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
    The logs aren't helpful, since the request eventually returns 200 and the page loads fine.

Description

When logged in, loading the dashboard takes 5 minutes and 40 seconds. This is a consistent number, leading me to believe there's some event that times out, the variation in response time is between 5:40.1 and 5:40.6. I'm not sure what timeout this is, but I feel like it should either be configurable, or less than one minute. Waiting for a page to load for more than 30 seconds is a little bad imo.

A thing to note, this only started happening after I physically moved my infrastructure somewhere else, so whatever is timing out is likely looking for a network resource that no longer exists.

Originally created by @asonix on GitHub (Jul 12, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version: 1.5 (also 1.4.2) - Git version: 2.17.1 - Operating system: Ubuntu 18.04 LTS on a Raspberry Pi 2 (armv7h) - Database: - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: The logs aren't helpful, since the request eventually returns 200 and the page loads fine. ## Description When logged in, loading the dashboard takes 5 minutes and 40 seconds. This is a consistent number, leading me to believe there's some event that times out, the variation in response time is between 5:40.1 and 5:40.6. I'm not sure what timeout this is, but I feel like it should either be configurable, or less than one minute. Waiting for a page to load for more than 30 seconds is a little bad imo. A thing to note, this only started happening after I physically moved my infrastructure somewhere else, so whatever is timing out is likely looking for a network resource that no longer exists. <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the issue/duplicate label 2025-11-02 04:22:24 -06:00
Author
Owner

@asonix commented on GitHub (Jul 12, 2018):

Followup. I also noticed that gitea wasn't loading my icon from gravatar. After setting my own icon on Gitea, the dashboard loads much faster (20 seconds, instead of 5 minutes and 40 seconds). Is it possible that there's a single gravatar request taking that long? My guess is it checks gravatar many times in the dashboard request, and those checks are sequential.

A possible fix could be caching the gravatar result per-request, instead of checking again on failure. For context, I'm the only active user on my gitea, and my icon is displayed on the page 30 times.

@asonix commented on GitHub (Jul 12, 2018): Followup. I also noticed that gitea wasn't loading my icon from gravatar. After setting my own icon on Gitea, the dashboard loads much faster (20 seconds, instead of 5 minutes and 40 seconds). Is it possible that there's a single gravatar request taking that long? My guess is it checks gravatar many times in the dashboard request, and those checks are sequential. A possible fix could be caching the gravatar result per-request, instead of checking again on failure. For context, I'm the only active user on my gitea, and my icon is displayed on the page 30 times.
Author
Owner

@techknowlogick commented on GitHub (Jul 12, 2018):

@asonix Do you have libravatar enabled?

Can you open the chrome (or FF) dev console and look at the network flow and their timing?

@techknowlogick commented on GitHub (Jul 12, 2018): @asonix Do you have libravatar enabled? Can you open the chrome (or FF) dev console and look at the network flow and their timing?
Author
Owner

@asonix commented on GitHub (Jul 12, 2018):

"Federated avatars" are enabled, "disable gravatar" is disabled, so it should use gravatar.

The network console doesn't help, since it is the initial request that takes 5 minutes. Everything else the page loads comes in quickly. The 5:40 number was actually something I pulled from the server log.

@asonix commented on GitHub (Jul 12, 2018): "Federated avatars" are enabled, "disable gravatar" is disabled, so it should use gravatar. The network console doesn't help, since it is the initial request that takes 5 minutes. Everything else the page loads comes in quickly. The 5:40 number was actually something I pulled from the server log.
Author
Owner

@asonix commented on GitHub (Jul 12, 2018):

Also it looks like libravatar is shutting down soon. That's a shame. I didn't know it existed until today

@asonix commented on GitHub (Jul 12, 2018): Also it looks like libravatar is shutting down soon. That's a shame. I didn't know it existed until today
Author
Owner

@techknowlogick commented on GitHub (Jul 12, 2018):

@asonix Well hopefully it's not shutting down, I, and a couple others are working on making sure it doesn't shut down.

But that makes some sense for the page load. Libravatar does DNS lookups to make sure that the correct avatar is displayed, but for some domains this request takes a while (there is built in caching, but I believe that only happens when there is a successful DNS response, need to confirm this though)

Ping @strk

@techknowlogick commented on GitHub (Jul 12, 2018): @asonix Well hopefully it's not shutting down, I, and a couple others are working on making sure it doesn't shut down. But that makes some sense for the page load. Libravatar does DNS lookups to make sure that the correct avatar is displayed, but for some domains this request takes a while (there is built in caching, but I believe that only happens when there is a successful DNS response, need to confirm this though) Ping @strk
Author
Owner

@ghost commented on GitHub (Jul 14, 2018):

For those who may work on this please review the following article from Steve Souders before addressing this https://www.stevesouders.com/blog/2010/06/01/frontend-spof/

@ghost commented on GitHub (Jul 14, 2018): For those who may work on this please review the following article from Steve Souders before addressing this https://www.stevesouders.com/blog/2010/06/01/frontend-spof/
Author
Owner

@ghost commented on GitHub (Jul 14, 2018):

Also it looks like libravatar is shutting down soon. That's a shame. I didn't know it existed until today

We'll come up with something better. If it's not sustainable it's probably a sign of a design flaw.

@ghost commented on GitHub (Jul 14, 2018): > Also it looks like libravatar is shutting down soon. That's a shame. I didn't know it existed until today We'll come up with something better. If it's not sustainable it's probably a sign of a design flaw.
Author
Owner

@mqudsi commented on GitHub (Jul 14, 2018):

@jhabdas while it's important to always keep SPOF in mind, I don't think that's directly relevant to this issue since it seems to be a backend delay/hang and not in the browser?

@mqudsi commented on GitHub (Jul 14, 2018): @jhabdas while it's important to always keep SPOF in mind, I don't think that's directly relevant to this issue since it seems to be a backend delay/hang and not in the browser?
Author
Owner

@techknowlogick commented on GitHub (Sep 9, 2018):

Closing as dupe of #1287

@techknowlogick commented on GitHub (Sep 9, 2018): Closing as dupe of #1287
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2051