Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restarting in loop: Issue Indexer Initialization timed-out after: 5m0s #17563

Closed
SkyAlexV opened this issue Nov 5, 2021 · 4 comments
Closed

Comments

@SkyAlexV
Copy link

SkyAlexV commented Nov 5, 2021

Gitea Version

1.15.6

Git Version

No response

Operating System

linux (docker)

How are you running Gitea?

docker-compose

  gitea:
    container_name: gitea.local
    image: gitea/gitea:latest
    environment:
      - RUN_MODE=prod

      - USER_UID=1000
      - USER_GID=1000

      - APP_NAME=#name
      - SSH_DOMAIN=#domain

      - SSH_PORT=22
      - HTTP_PORT=3000

      - DB_TYPE=mysql
      - DB_HOST=db.local:3306
      - DB_NAME=gitea
      - DB_USER=gitea
      - DB_PASSWD=#password

      - INSTALL_LOCK=true

      - DISABLE_REGISTRATION=true
      - REQUIRE_SIGNIN_VIEW=true
    restart: always
    volumes:
      - ./data:/data
    ports:
      - "127.0.0.1:3000:3000"
      - "22:22"

Database

MySQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://skyio.xyz/t/6185b3fb56efd0f8e2d7ccbd/raw

Description

Gitea server restarting every 5 minutes (indexer.STARTUP_TIMEOUT).

with log:

...ue/queue_bytefifo.go:242:Shutdown() [D] level: issue_indexer Shutdown
...ue/queue_bytefifo.go:260:Terminate() [D] level: issue_indexer Closing with 0 tasks left in queue
...ue/queue_bytefifo.go:266:Terminate() [D] level: issue_indexer Terminated

my app.ini:

APP_NAME = #name
RUN_MODE = prod
RUN_USER = git

[repository]
ROOT = /data/git/repositories

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

[server]
APP_DATA_PATH    = /data/gitea
SSH_DOMAIN       = #domain
HTTP_PORT        = 3000
ROOT_URL         = https://#domain/
DISABLE_SSH      = false
SSH_PORT         = 22
DOMAIN           = #domain
LFS_START_SERVER = true
LFS_CONTENT_PATH = /data/gitea/lfs
LFS_JWT_SECRET   = #secret
OFFLINE_MODE     = true

[database]
PATH     = /data/gitea/gitea.db
DB_TYPE  = mysql
HOST     = db.local:3306
NAME     = gitea
USER     = gitea
PASSWD   = #password
SSL_MODE = disable
CHARSET=

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

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

[attachment]
PATH = /data/gitea/attachments

[log]
ROOT_PATH = /data/gitea/log
MODE      = file
;LEVEL     = Info
LEVEL = debug
ROUTER = console
COLORIZE = false


[security]
INSTALL_LOCK   = true
SECRET_KEY     = #key
INTERNAL_TOKEN = #token

[service]
DISABLE_REGISTRATION              = true
REQUIRE_SIGNIN_VIEW               = true
REGISTER_EMAIL_CONFIRM            = false
ENABLE_NOTIFY_MAIL                = true
ALLOW_ONLY_EXTERNAL_REGISTRATION  = false
ENABLE_CAPTCHA                    = false
DEFAULT_KEEP_EMAIL_PRIVATE        = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = false
DEFAULT_ENABLE_TIMETRACKING       = true
NO_REPLY_ADDRESS                  = #domain

[mailer]
ENABLED = true
HOST    = #server
FROM    = git@#domain
USER    = git@#domain
PASSWD  = #password

[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false

[other]
SHOW_FOOTER_BRANDING = false
SHOW_FOOTER_VERSION = false
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false

[indexer]
REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = indexers/repos.bleve
UPDATE_BUFFER_LEN = 20
MAX_FILE_SIZE = 1048576
STARTUP_TIMEOUT = 3600s
REPO_INDEXER_INCLUDE =


[queue]
WORKERS = 0
MAX_WORKERS = 10
BLOCK_TIMEOUT = 1s
BOOST_TIMEOUT = 5m
BOOST_WORKERS = 1

Please help.

Screenshots

No response

@SkyAlexV SkyAlexV changed the title cycling restarts: Issue Indexer Initialization timed-out after: 5m0s restarting in loop: Issue Indexer Initialization timed-out after: 5m0s Nov 5, 2021
@zeripath
Copy link
Contributor

zeripath commented Nov 6, 2021

Assuming this is your first startup the problem is something to do with your volumes being inappropriate for bleve.

You can however switch your issue indexer from bleve to the db or elasticsearch as appropriate.

@zeripath
Copy link
Contributor

zeripath commented Nov 6, 2021

[indexer]
ISSUE_INDEXER_TYPE=db

@zeripath
Copy link
Contributor

zeripath commented Nov 6, 2021

Similarly if you're running multiple dockers at the same time (e.g. #15512) bleve will not work for this and you will need to use db or elasticsearch. (It should also be noted that the default queue type will not work either - you would need to switch to redis:

[queue]
TYPE=redis

)

@SkyAlexV
Copy link
Author

SkyAlexV commented Nov 6, 2021

[indexer]
ISSUE_INDEXER_TYPE=db

It works!
Thanks.

@SkyAlexV SkyAlexV closed this as completed Nov 6, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants