git push/pull via ssh extremly slow (up to 1 minute for pull with no changes) #13148

Closed
opened 2025-11-02 10:32:48 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @jarinox on GitHub (Jun 13, 2024).

Description

After migrating Gitea to a new server by following the backup and restore guide cloning, pushing and pulling of repositories via ssh takes up to 1 minute. Using https it works just fine.

In the logs I discovered GET /user/events taking up to 42385ms

Jun 13 12:15:50 h3007892.stratoserver.net gitea[88090]: 2024/06/13 12:15:50 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/events for 141.70.80.5:0, 200 OK in 42385.2ms @ events/events.go:18(events.Events)

Gitea Version

1.22.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/jarinox/6473f068ed781ff5815ed0da7dfe09d6

Screenshots

No response

Git Version

2.39.2

Operating System

Debian GNU/Linux 12 (bookworm)

How are you running Gitea?

binary via systemd

Database

SQLite

Originally created by @jarinox on GitHub (Jun 13, 2024). ### Description After migrating Gitea to a new server by following the [backup and restore](https://docs.gitea.com/administration/backup-and-restore) guide cloning, pushing and pulling of repositories via ssh takes up to 1 minute. Using https it works just fine. In the logs I discovered `GET /user/events` taking up to `42385ms` ``` Jun 13 12:15:50 h3007892.stratoserver.net gitea[88090]: 2024/06/13 12:15:50 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/events for 141.70.80.5:0, 200 OK in 42385.2ms @ events/events.go:18(events.Events) ``` ### Gitea Version 1.22.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/jarinox/6473f068ed781ff5815ed0da7dfe09d6 ### Screenshots _No response_ ### Git Version 2.39.2 ### Operating System Debian GNU/Linux 12 (bookworm) ### How are you running Gitea? binary via systemd ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 10:32:48 -06:00
Author
Owner

@lunny commented on GitHub (Jun 13, 2024):

This router will not block the ssh operations. Maybe you need to find another router logs.

@lunny commented on GitHub (Jun 13, 2024): This router will not block the ssh operations. Maybe you need to find another router logs.
Author
Owner

@jarinox commented on GitHub (Jun 14, 2024):

Thank you for looking into the logs!
I noticed when starting a git push / pull nothing is added to the logs immediately. The pull also took rather 2 minutes than 1 minute.

These are some new logs from 3 pull events:
https://gist.github.com/jarinox/589585022228be012a1ec52dc573f4da

My log config looked like this for the above logs:

[log]
MODE = console
LEVEL = TRACE
ROUTER = console
ROOT_PATH = /var/lib/gitea/log
ENABLE_SSH_LOG = true

Can I change them to make it easier to debug the problem?

@jarinox commented on GitHub (Jun 14, 2024): Thank you for looking into the logs! I noticed when starting a git push / pull nothing is added to the logs immediately. The pull also took rather 2 minutes than 1 minute. These are some new logs from 3 pull events: https://gist.github.com/jarinox/589585022228be012a1ec52dc573f4da My log config looked like this for the above logs: ``` [log] MODE = console LEVEL = TRACE ROUTER = console ROOT_PATH = /var/lib/gitea/log ENABLE_SSH_LOG = true ``` Can I change them to make it easier to debug the problem?
Author
Owner

@jarinox commented on GitHub (Aug 2, 2024):

Everything works fine now with version 1.22.1

@jarinox commented on GitHub (Aug 2, 2024): Everything works fine now with version 1.22.1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13148