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

When debug mirror process, queue creation failure with resource temporarily unavailable #18921

Closed
lunny opened this issue Feb 26, 2022 · 4 comments
Labels

Comments

@lunny
Copy link
Member

lunny commented Feb 26, 2022

2022/02/26 20:34:50 .../cron/tasks_basic.go:41:func1() [I] ======== &cron.UpdateMirrorTaskConfig{BaseConfig:cron.BaseConfig{Enabled:true, RunAtStart:false, Schedule:"@every 1m", NoSuccessNotice:true}, PullLimit:1000, PushLimit:1000}
2022/02/26 20:34:50 ...ces/mirror/mirror.go:56:Update() [T] Doing: Update
2022/02/26 20:34:50 ...odels/repo/mirror.go:128:MirrorsIterate() [I] [SQL] SELECT "id", "repo_id", "interval", "enable_prune", "updated_unix", "next_update_unix", "lfs_enabled", "lfs_endpoint" FROM "mirror" WHERE (next_update_unix<=$1) AND (next_update_unix!=0) ORDER BY updated_unix ASC [1645878890] - 31.802881ms
2022/02/26 20:34:50 ...s/repo/pushmirror.go:109:PushMirrorsIterate() [I] [SQL] SELECT "id", "repo_id", "remote_name", "interval", "created_unix", "last_update", "last_error" FROM "push_mirror" WHERE (last_update + ("interval" / $1) <= $2) AND ("interval" != 0) ORDER BY last_update ASC [1s 1645878890] - 15.163638ms
2022/02/26 20:34:50 ...ces/mirror/mirror.go:137:Update() [T] Finished: Update: 0 pull mirrors and 0 push mirrors queued
2022/02/26 20:35:09 ...ueue_disk_channel.go:165:Run() [F] Unable to create internal queue for notification-service Error: unable to create queue level for notification-service with cfg queue.LevelQueueConfiguration{ByteFIFOQueueConfiguration:queue.ByteFIFOQueueConfiguration{WorkerPoolConfiguration:queue.WorkerPoolConfiguration{QueueLength:20, BatchLength:20, BlockTimeout:1000000000, BoostTimeout:300000000000, BoostWorkers:1, MaxWorkers:5}, Workers:0, Name:"notification-service-level", WaitOnEmpty:false}, DataDir:"/data/gitea/gitea/data/queues/common", ConnectionString:"", QueueName:""} by max attempts: error: resource temporarily unavailable
@lunny lunny added the type/bug label Feb 26, 2022
@lunny
Copy link
Member Author

lunny commented Feb 26, 2022

OK. I see, different type queues should not share a folder.

@zeripath
Copy link
Contributor

They should be able to share the same folder - common queues should be detected and just use the same connection. I'm gonna need to see the rest of your queue configuration.

This error looks like there's something else running at the same on the same dir.

@lunny
Copy link
Member Author

lunny commented Feb 26, 2022

duplicated with #18917

@lunny lunny closed this as completed Feb 26, 2022
zeripath added a commit to zeripath/gitea that referenced this issue Feb 26, 2022
…rmed connstr

This PR adjusts the error returned when there is failure to lock the level db, and
permits a connections to the same leveldb where there is a different connection string.

Reference go-gitea#18921
Reference go-gitea#18917

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath
Copy link
Contributor

I think in this case the problem was that there were conflicting CONN_STRs for the connection to the level db. Removing the incorrect CONN_STR from the queue configuration solves the issue but #18923 would prevent the problem too.

zeripath added a commit that referenced this issue Feb 27, 2022
…rmed connstr (#18923)

This PR adjusts the error returned when there is failure to lock the level db, and
permits a connections to the same leveldb where there is a different connection string.

Reference #18921
Reference #18917

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this issue Feb 27, 2022
…rmed connstr (go-gitea#18923)

Backport go-gitea#18923

This PR adjusts the error returned when there is failure to lock the level db, and
permits a connections to the same leveldb where there is a different connection string.

Reference go-gitea#18921
Reference go-gitea#18917

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit that referenced this issue Feb 28, 2022
…rmed connstr (#18923) (#18938)

Backport #18923

This PR adjusts the error returned when there is failure to lock the level db, and
permits a connections to the same leveldb where there is a different connection string.

Reference #18921
Reference #18917

Signed-off-by: Andrew Thornton <art27@cantab.net>
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
…rmed connstr (go-gitea#18923)

This PR adjusts the error returned when there is failure to lock the level db, and
permits a connections to the same leveldb where there is a different connection string.

Reference go-gitea#18921
Reference go-gitea#18917

Signed-off-by: Andrew Thornton <art27@cantab.net>
@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
Projects
None yet
Development

No branches or pull requests

2 participants