Webinterface freezes in Firefox #5618

Closed
opened 2025-11-02 06:31:03 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @stevenmccormack on GitHub (Jun 23, 2020).

  • Gitea version (or commit ref): 1.12.1
  • Git version: 2.20.1
  • Operating system: Debian 10
  • 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:

Description

After upgrading from 1.11.0 to 1.12.1 the webinterface periodically freezes for about 30-60 seconds. After about 5 clicks (it does not matter what I click, I can go to the main page and press F5 to reproduce the issue) the browser seems to be stuck during page load.
The logfile (loglevel Trace) only shows the following every 10 secunds during the freeze

2020/06/23 14:13:40 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT user_id, count(*) AS count FROM notification WHERE user_id IN (SELECT user_id FROM notificatio
n WHERE updated_unix >= ? AND updated_unix < ?) AND status = ? GROUP BY user_id [1592914408 1592914418 1] - 2.564311ms
2020/06/23 14:13:50 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT user_id, count(*) AS count FROM notification WHERE user_id IN (SELECT user_id FROM notificatio
n WHERE updated_unix >= ? AND updated_unix < ?) AND status = ? GROUP BY user_id [1592914418 1592914428 1] - 2.689541ms

After 30-60 seconds the log shows that the request is preocessed and if I reload the page it works again for about 5 clicks

This only seems to happen when I use Firefox (77.0.1 Linux). Chrome seems to work just fine

Originally created by @stevenmccormack on GitHub (Jun 23, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) 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 (or commit ref): 1.12.1 - Git version: 2.20.1 - Operating system: Debian 10 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description After upgrading from 1.11.0 to 1.12.1 the webinterface periodically freezes for about 30-60 seconds. After about 5 clicks (it does not matter what I click, I can go to the main page and press F5 to reproduce the issue) the browser seems to be stuck during page load. The logfile (loglevel Trace) only shows the following every 10 secunds during the freeze ``` 2020/06/23 14:13:40 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT user_id, count(*) AS count FROM notification WHERE user_id IN (SELECT user_id FROM notificatio n WHERE updated_unix >= ? AND updated_unix < ?) AND status = ? GROUP BY user_id [1592914408 1592914418 1] - 2.564311ms 2020/06/23 14:13:50 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT user_id, count(*) AS count FROM notification WHERE user_id IN (SELECT user_id FROM notificatio n WHERE updated_unix >= ? AND updated_unix < ?) AND status = ? GROUP BY user_id [1592914418 1592914428 1] - 2.689541ms ``` After 30-60 seconds the log shows that the request is preocessed and if I reload the page it works again for about 5 clicks This only seems to happen when I use Firefox (77.0.1 Linux). Chrome seems to work just fine
GiteaMirror added the issue/duplicate label 2025-11-02 06:31:03 -06:00
Author
Owner

@kolaente commented on GitHub (Jun 23, 2020):

Anything in the browser console? Is it the same on try?

(I'm running my instance on master and don't have any issues in Firefox)

@kolaente commented on GitHub (Jun 23, 2020): Anything in the browser console? Is it the same on [try](https://try.gitea.io)? (I'm running my instance on master and don't have any issues in Firefox)
Author
Owner

@jmert commented on GitHub (Jun 23, 2020):

I'm seeing the same thing as OP: personally run instance is stalling on web requests in Firefox, but not on the try.gitea.io instance. I'm not seeing anything in Firefox's console while the page load is stalled (no messages in Console, nor any activity in the Network tab).

Server information:

  • Gitea 1.12.1
  • with SQLite database
  • on Ubuntu 18.04LTS
  • with git version 2.17.1
  • served through an Apache 2.4.29 reverse proxy (HTTPS to client)

Client information:

  • Firefox 77.0.1 on Arch Linux
  • reproducible after restarting Firefox in Safe Mode

Looking at the Apache logs for the proxy, it might be the GET /git/user/events requests which are stalling (??).

@jmert commented on GitHub (Jun 23, 2020): I'm seeing the same thing as OP: personally run instance is stalling on web requests in Firefox, but not on the try.gitea.io instance. I'm not seeing anything in Firefox's console while the page load is stalled (no messages in Console, nor any activity in the Network tab). Server information: - Gitea 1.12.1 - with SQLite database - on Ubuntu 18.04LTS - with git version 2.17.1 - served through an Apache 2.4.29 reverse proxy (HTTPS to client) Client information: - Firefox 77.0.1 on Arch Linux - reproducible after restarting Firefox in Safe Mode Looking at the Apache logs for the proxy, it _might_ be the `GET /git/user/events` requests which are stalling (??).
Author
Owner

@lafriks commented on GitHub (Jun 23, 2020):

Duplicate of #11978

@lafriks commented on GitHub (Jun 23, 2020): Duplicate of #11978
Author
Owner

@lafriks commented on GitHub (Jun 23, 2020):

Clear browser cache, that should fix freezing in single tab

@lafriks commented on GitHub (Jun 23, 2020): Clear browser cache, that should fix freezing in single tab
Author
Owner

@titou10titou10 commented on GitHub (Jun 23, 2020):

@lafriks clearing the cache did not improved the situation. I'm in the same boat at the others
And as for the others, 5 seems to be a "magical" number here

@titou10titou10 commented on GitHub (Jun 23, 2020): @lafriks clearing the cache did not improved the situation. I'm in the same boat at the others And as for the others, 5 seems to be a "magical" number here
Author
Owner

@jmert commented on GitHub (Jun 23, 2020):

This is probably a key point: https://developer.mozilla.org/en-US/docs/Web/API/EventSource. In Firefox, there's a limit on the total number of EventSources used for each domain when the page is accessed via HTTP/1.1. I can confirm that the server where I've seen the problem only supports HTTP/1.1. (I have another which has HTTP/2 enabled, but it hasn't yet been upgraded to gitea v1.12 so I can't yet say for sure that it won't have problem eventually there, too.)

@jmert commented on GitHub (Jun 23, 2020): This is probably a key point: https://developer.mozilla.org/en-US/docs/Web/API/EventSource. In Firefox, there's a limit on the total number of `EventSource`s used for each domain when the page is accessed via HTTP/1.1. I can confirm that the server where I've seen the problem only supports HTTP/1.1. (I have another which has HTTP/2 enabled, but it hasn't yet been upgraded to gitea v1.12 so I can't yet say for sure that it won't have problem eventually there, too.)
Author
Owner

@twoequaldots commented on GitHub (Jun 23, 2020):

I can confirm this problem exists for me as well. I've tried to clear browser cache in Firefox and it does not help. This problem appeared in 1.12.0 and prevails in 1.12.1.

A buddy of mine also suspect it is related to EventSource. It seems to be pointing that direction. Right now I'm using Chrome / Chromium with no issue (only Firefox).

@twoequaldots commented on GitHub (Jun 23, 2020): I can confirm this problem exists for me as well. I've tried to clear browser cache in Firefox and it does not help. This problem appeared in 1.12.0 and prevails in 1.12.1. A buddy of mine also suspect it is related to `EventSource`. It seems to be pointing that direction. Right now I'm using Chrome / Chromium with no issue (only Firefox).
Author
Owner

@Briffou commented on GitHub (Jun 24, 2020):

Had the same issue on Firefox with gitea 1.12.1 and a server using HTTP/1. I activated HTTP/2 on the server as mentioned by @jmert, and this bug didn't show up since. So, thank you @jmert for pointing out EventSource !

@Briffou commented on GitHub (Jun 24, 2020): Had the same issue on Firefox with gitea 1.12.1 and a server using HTTP/1. I activated HTTP/2 on the server as mentioned by @jmert, and this bug didn't show up since. So, thank you @jmert for pointing out EventSource !
Author
Owner

@stevenmccormack commented on GitHub (Jun 24, 2020):

I am running my instance behind HAProxy. I can confirm, that the problem goes away for me as well after enabling HTTP/2 for this frontend in HAProxy.

@stevenmccormack commented on GitHub (Jun 24, 2020): I am running my instance behind HAProxy. I can confirm, that the problem goes away for me as well after enabling HTTP/2 for this frontend in HAProxy.
Author
Owner

@zeripath commented on GitHub (Jun 24, 2020):

I'm betting this is a duplicate of #11978

@zeripath commented on GitHub (Jun 24, 2020): I'm betting this is a duplicate of #11978
Author
Owner

@lafriks commented on GitHub (Jun 26, 2020):

Closing as duplicate

@lafriks commented on GitHub (Jun 26, 2020): Closing as duplicate
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5618