No mirror syncs (already in queue), cannot flush queues #12381

Closed
opened 2025-11-02 10:08:02 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @stevesbrain on GitHub (Jan 24, 2024).

Description

Using the official docker image.

I noted that some of my mirrored repositories had not updated in 3 months.

I can clone new mirror repositories from the same provider no issues.

Manually running a sync provides the following in gitea.log:

...ices/mirror/queue.go:59:func1() [E] Unable to push sync request for to the queue for pull mirror repo[112]. Error: already in queue

Web interface shows queue empty:

image

Tried to flush queues anyway via command line, but this also resulted in an error:

26beeea78e51:/$ gitea manager flush-queues
2024/01/25 09:37:08 .../setting/security.go:168:loadSecurityFrom() [W] Enabling Query API Auth tokens is not recommended. DISABLE_QUERY_AUTH_TOKEN will default to true in gitea 1.23 and will be removed in gitea 1.24.
context deadline exceeded
internal API error response, status=408

This generated the following error in the gitea.log:
...eb/routing/logger.go:102:func1() [I] router: completed POST /api/internal/manager/flush-queues for 127.0.0.1:0, 408 Request Timeout in 60458.1ms @ private/manager.go:35(private.FlushQueues)

Any clues where I might be going wrong?

docker-compose.yml:

version: "3"

networks:
  gitea:
    external: false

services:
  server:
    image: gitea/gitea:latest
    container_name: gitea
    environment:
      - USER_UID=1000
      - USER_GID=1000
    restart: always
    networks:
      - gitea
    volumes:
      - ./data:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "127.0.0.1:3000:3000"
      - "127.0.0.1:2224:2224"

app.ini:

APP_NAME = Git
RUN_MODE = prod
RUN_USER = git
WORK_PATH = /data/gitea

[repository]
ROOT = /data/git/repositories

[repository.upload]
TEMP_PATH = /data/gitea/uploads

[server]
PROTOCOL = http
APP_DATA_PATH = /data/gitea
SSH_DOMAIN = git.domain.com
HTTP_PORT = 3000
ROOT_URL = https://git.domain.com
DISABLE_SSH = false
START_SSH_SERVER = true
SSH_PORT = 2224
DOMAIN = git.domain.com
LFS_START_SERVER = true
LFS_JWT_SECRET = REMOVED
OFFLINE_MODE = true
ENABLE_GZIP = true

[lfs]
PATH = /data/gitea/lfs

[database]
PATH = /data/gitea/gitea.db
DB_TYPE = sqlite3
HOST = localhost:3306
NAME = gitea
USER = root
PASSWD = REMOVED
SSL_MODE = disable

[session]
PROVIDER_CONFIG = /data/gitea/sessions
PROVIDER = file

[picture]
AVATAR_UPLOAD_PATH = /data/gitea/avatars
DISABLE_GRAVATAR = false
ENABLE_FEDERATED_AVATAR = false

[attachment]
PATH = /data/gitea/attachments

[log]
ROOT_PATH = /data/gitea/log
MODE = file
LEVEL = Info

[security]
INSTALL_LOCK = true
SECRET_KEY = REMOVED
INTERNAL_TOKEN = REMOVED
LOGIN_REMEMBER_DAYS = 14
COOKIE_USERNAME = REMOVED
COOKIE_REMEMBER_NAME = REMOVED

[mailer]
ENABLED = false
HOST = mail.domain.com:465
FROM = "REMOVED" <REMOVED@domain.com>
USER = git@domain.com
PASSWD = REMOVED

[service]
REGISTER_EMAIL_CONFIRM = true
ENABLE_NOTIFY_MAIL = true
DISABLE_REGISTRATION = false
ENABLE_CAPTCHA = true
REQUIRE_SIGNIN_VIEW = false
DEFAULT_KEEP_EMAIL_PRIVATE = true
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = noreply.domain.com

[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false

[oauth2]
JWT_SECRET = REMOVED

[cron.update_mirrors]
SCHEDULE = @every 10m
ENABLED = true
RUN_AT_START = true
PULL_LIMIT=100
PUSH_LIMIT=100

[mirror]
ENABLED = true
DEFAULT_INTERVAL = 8h

Gitea Version

1.21.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.40.1

Operating System

Official gitea image, which appears to be Alpine Linux 3.18

How are you running Gitea?

Docker (as per description details)

Database

SQLite

Originally created by @stevesbrain on GitHub (Jan 24, 2024). ### Description Using the official docker image. I noted that some of my mirrored repositories had not updated in 3 months. I can clone new mirror repositories from the same provider no issues. Manually running a sync provides the following in gitea.log: `...ices/mirror/queue.go:59:func1() [E] Unable to push sync request for to the queue for pull mirror repo[112]. Error: already in queue` Web interface shows queue empty: ![image](https://github.com/go-gitea/gitea/assets/6745111/8072ac1f-cccd-4525-aec0-b57a22781518) Tried to flush queues anyway via command line, but this also resulted in an error: ``` 26beeea78e51:/$ gitea manager flush-queues 2024/01/25 09:37:08 .../setting/security.go:168:loadSecurityFrom() [W] Enabling Query API Auth tokens is not recommended. DISABLE_QUERY_AUTH_TOKEN will default to true in gitea 1.23 and will be removed in gitea 1.24. context deadline exceeded internal API error response, status=408 ``` This generated the following error in the gitea.log: `...eb/routing/logger.go:102:func1() [I] router: completed POST /api/internal/manager/flush-queues for 127.0.0.1:0, 408 Request Timeout in 60458.1ms @ private/manager.go:35(private.FlushQueues)` Any clues where I might be going wrong? docker-compose.yml: ``` version: "3" networks: gitea: external: false services: server: image: gitea/gitea:latest container_name: gitea environment: - USER_UID=1000 - USER_GID=1000 restart: always networks: - gitea volumes: - ./data:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "127.0.0.1:3000:3000" - "127.0.0.1:2224:2224" ``` app.ini: ``` APP_NAME = Git RUN_MODE = prod RUN_USER = git WORK_PATH = /data/gitea [repository] ROOT = /data/git/repositories [repository.upload] TEMP_PATH = /data/gitea/uploads [server] PROTOCOL = http APP_DATA_PATH = /data/gitea SSH_DOMAIN = git.domain.com HTTP_PORT = 3000 ROOT_URL = https://git.domain.com DISABLE_SSH = false START_SSH_SERVER = true SSH_PORT = 2224 DOMAIN = git.domain.com LFS_START_SERVER = true LFS_JWT_SECRET = REMOVED OFFLINE_MODE = true ENABLE_GZIP = true [lfs] PATH = /data/gitea/lfs [database] PATH = /data/gitea/gitea.db DB_TYPE = sqlite3 HOST = localhost:3306 NAME = gitea USER = root PASSWD = REMOVED SSL_MODE = disable [session] PROVIDER_CONFIG = /data/gitea/sessions PROVIDER = file [picture] AVATAR_UPLOAD_PATH = /data/gitea/avatars DISABLE_GRAVATAR = false ENABLE_FEDERATED_AVATAR = false [attachment] PATH = /data/gitea/attachments [log] ROOT_PATH = /data/gitea/log MODE = file LEVEL = Info [security] INSTALL_LOCK = true SECRET_KEY = REMOVED INTERNAL_TOKEN = REMOVED LOGIN_REMEMBER_DAYS = 14 COOKIE_USERNAME = REMOVED COOKIE_REMEMBER_NAME = REMOVED [mailer] ENABLED = false HOST = mail.domain.com:465 FROM = "REMOVED" <REMOVED@domain.com> USER = git@domain.com PASSWD = REMOVED [service] REGISTER_EMAIL_CONFIRM = true ENABLE_NOTIFY_MAIL = true DISABLE_REGISTRATION = false ENABLE_CAPTCHA = true REQUIRE_SIGNIN_VIEW = false DEFAULT_KEEP_EMAIL_PRIVATE = true DEFAULT_ALLOW_CREATE_ORGANIZATION = true DEFAULT_ENABLE_TIMETRACKING = true NO_REPLY_ADDRESS = noreply.domain.com [openid] ENABLE_OPENID_SIGNIN = false ENABLE_OPENID_SIGNUP = false [oauth2] JWT_SECRET = REMOVED [cron.update_mirrors] SCHEDULE = @every 10m ENABLED = true RUN_AT_START = true PULL_LIMIT=100 PUSH_LIMIT=100 [mirror] ENABLED = true DEFAULT_INTERVAL = 8h ``` ### Gitea Version 1.21.4 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.40.1 ### Operating System Official gitea image, which appears to be Alpine Linux 3.18 ### How are you running Gitea? Docker (as per description details) ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 10:08:02 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jan 25, 2024):

Could you try to "Remove all" queue items and retry? Maybe it's related to levelqueue corruption.

image

@wxiaoguang commented on GitHub (Jan 25, 2024): Could you try to "Remove all" queue items and retry? Maybe it's related to levelqueue corruption. ![image](https://github.com/go-gitea/gitea/assets/2114189/5ac80f41-3b16-4c61-ad00-be3ab127dee1)
Author
Owner

@stevesbrain commented on GitHub (Jan 25, 2024):

Thank you - didn't know about that feature. It is working now - is this just likely random corruption, or is there some misconfiguration I've made that's likely contributed to this?

@stevesbrain commented on GitHub (Jan 25, 2024): Thank you - didn't know about that feature. It is working now - is this just likely random corruption, or is there some misconfiguration I've made that's likely contributed to this?
Author
Owner

@wxiaoguang commented on GitHub (Jan 25, 2024):

It might be a levelqueue bug (not misconfiguration)

Just a guess, more details: Help to recover from corrupted levelqueue #24912

@wxiaoguang commented on GitHub (Jan 25, 2024): It might be a levelqueue bug (not misconfiguration) Just a guess, more details: Help to recover from corrupted levelqueue #24912
Author
Owner

@stevesbrain commented on GitHub (Jan 25, 2024):

Sure, thank you - I'll keep an eye on it to see, but will close it off for now. Have a great night/day!

@stevesbrain commented on GitHub (Jan 25, 2024): Sure, thank you - I'll keep an eye on it to see, but will close it off for now. Have a great night/day!
Author
Owner

@github-actions[bot] commented on GitHub (Feb 29, 2024):

Automatically locked because of our CONTRIBUTING guidelines

@github-actions[bot] commented on GitHub (Feb 29, 2024): Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12381