Skip to content

Gitea is slow when external avatar services are down #6046

Closed
@gaah666

Description

@gaah666
  • Gitea version (or commit ref): 1.7
  • Git version:
  • Operating system: RedHat 7
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Console log:
[Macaron] 2019-02-12 14:47:11: Started GET / for 10.10.10.1
[Macaron] 2019-02-12 14:48:11: Completed GET / 200 OK in 1m0.064527745s

app.log -file:
404 2019/02/12 14:47:11 [D] Session ID: 541269a9dc47baf3
405 2019/02/12 14:47:11 [D] CSRF Token: -IiHK1CVOgkwyuyXL13P1Gri6Xc6MTU0OTk3NTQ5NzM3NzY5MDYxNg==
406 2019/02/12 14:47:11 [D] Template: user/dashboard/dashboard
407 2019/02/12 14:47:31 [...modules/base/tool.go:216 SizedAvatarLink()] [E] LibravatarService.FromEmail(email=x@localhost): error 407 lookup _avatars-sec._tcp.localhost on 4.2.2.2:53: read udp 10.0.2.15:45383->4.2.2.2:53: i/o timeout
408 2019/02/12 14:47:51 [...modules/base/tool.go:216 SizedAvatarLink()] [E] LibravatarService.FromEmail(email=x@localhost): error 408 lookup _avatars-sec._tcp.localhost on 4.2.2.2:53: read udp 10.0.2.15:58838->4.2.2.2:53: i/o timeout
409 2019/02/12 14:48:11 [...modules/base/tool.go:216 SizedAvatarLink()] [E] LibravatarService.FromEmail(email=x@localhost): error 409 lookup _avatars-sec._tcp.localhost on 4.2.2.2:53: read udp 10.0.2.15:42802->4.2.2.2:53: i/o timeout

Description

When enabling external avatars, when those sites are down or doesn't reply in a timely fashion, I think Gitea isn't behaving in a nice way...
As seen from the logs above... Browser makes a request, then exactly 1m after it actually starts loading the page and resources aso... 1 minute per page load, because an external avatar request timed out.

I think this should be a lot shorter cut off time than one minute, or be configurable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions