Error: Resource temporarily unavailable #2298

Closed
opened 2025-11-02 04:31:42 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @LukeOwlclaw on GitHub (Sep 5, 2018).

  • Gitea Version: 1.5.1 (Go1.10.1)
  • Operating system: Client: Ubuntu 14.4; Server: Windows
  • Git version: 2.18.0
  • 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

When issueing (seemingly expensive) git commands like git subtree push and git submodule add, I am seeing following errors (complete output), respectively:

git push using:  https://server/orga/TestApps.git master
Enumerating objects: 1183, done.
Counting objects: 100% (1183/1183), done.
Delta compression using up to 4 threads.
Compressing objects: 100% (636/636), done.
Writing objects: 100% (1183/1183), 9.70 MiB | 1.04 MiB/s, done.
Total 1183 (delta 678), reused 846 (delta 524)
remote: Resolving deltas: 100% (678/678), done.
remote:       1 [main] bash 5740 fork: child -1 - forked process 2976 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
remote: hooks/pre-receive: fork: retry: Resource temporarily unavailable
remote: 1278874 [main] bash 5740 fork: child -1 - forked process 316 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
remote: hooks/pre-receive: fork: retry: Resource temporarily unavailable
remote: 3486808 [main] bash 5740 fork: child -1 - forked process 5524 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
remote: hooks/pre-receive: fork: retry: Resource temporarily unavailable
remote: 7674766 [main] bash 5740 fork: child -1 - forked process 4612 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
remote: hooks/pre-receive: fork: retry: Resource temporarily unavailable
remote: 16643732 [main] bash 5740 fork: child -1 - forked process 4512 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
remote: hooks/pre-receive: fork: Resource temporarily unavailable
To https://server/orga/TestApps.git
 ! [remote rejected]     a14e8311b774f168351486aaa666aadd07bab129 -> master (pre-receive hook declined)
error: failed to push some refs to 'https://server/orga/TestApps.git'
#Return code: 1

and

Cloning into '/data/workdir/git/repo'...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 20 (delta 5), reused 0 (delta 0)
Unpacking objects: 100% (20/20), done.
[master 0d53eaf] Added submodule repo
 2 files changed, 4 insertions(+)
 create mode 160000 repo
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 429 bytes | 429.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote:       1 [main] bash 1576 fork: child -1 - forked process 4304 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
remote: ./hooks/update.d/gitea: fork: retry: Resource temporarily unavailable
remote: 1077096 [main] bash 1576 fork: child -1 - forked process 3420 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
remote: ./hooks/update.d/gitea: fork: retry: Resource temporarily unavailable
remote: 3267889 [main] bash 1576 fork: child -1 - forked process 5884 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
remote: ./hooks/update.d/gitea: fork: retry: Resource temporarily unavailable
remote: 7526358 [main] bash 1576 fork: child -1 - forked process 5424 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
remote: ./hooks/update.d/gitea: fork: retry: Resource temporarily unavailable
remote: 15650635 [main] bash 1576 fork: child -1 - forked process 4000 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
remote: ./hooks/update.d/gitea: fork: Resource temporarily unavailable
remote: error: hook declined to update refs/heads/master
To https://server/orga2/repo2
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'https://server/orga2/repo2'
#Return code: 1

For the latter error message I found ./hooks/update.d/gitea on my server. So it seems to be a problem on the server side. Agreed?

Content of ./hooks/update.d/gitea:

#!/usr/bin/env bash
"D:/Bin/Gitea/gitea-1.5.1-windows-4.0-amd64.exe" hook --config='D:/Bin/Gitea/custom/conf/app.ini' update $1 $2 $3 

This SO entry suggests to increase the number of available file descriptors. How would this be possible on a Windows machine? Is there a configuration option for Gitea?

Note: This is a temporary problem. When issueing the same command again, the problem usually does not occur again.

Note2: The server has only limited resources. Which type of resource would I need to increase?

Originally created by @LukeOwlclaw on GitHub (Sep 5, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) 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: 1.5.1 (Go1.10.1) - Operating system: Client: Ubuntu 14.4; Server: Windows - Git version: 2.18.0 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [x] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description When issueing (seemingly expensive) git commands like `git subtree push` and `git submodule add`, I am seeing following errors (complete output), respectively: git push using: https://server/orga/TestApps.git master Enumerating objects: 1183, done. Counting objects: 100% (1183/1183), done. Delta compression using up to 4 threads. Compressing objects: 100% (636/636), done. Writing objects: 100% (1183/1183), 9.70 MiB | 1.04 MiB/s, done. Total 1183 (delta 678), reused 846 (delta 524) remote: Resolving deltas: 100% (678/678), done. remote: 1 [main] bash 5740 fork: child -1 - forked process 2976 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 remote: hooks/pre-receive: fork: retry: Resource temporarily unavailable remote: 1278874 [main] bash 5740 fork: child -1 - forked process 316 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 remote: hooks/pre-receive: fork: retry: Resource temporarily unavailable remote: 3486808 [main] bash 5740 fork: child -1 - forked process 5524 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 remote: hooks/pre-receive: fork: retry: Resource temporarily unavailable remote: 7674766 [main] bash 5740 fork: child -1 - forked process 4612 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 remote: hooks/pre-receive: fork: retry: Resource temporarily unavailable remote: 16643732 [main] bash 5740 fork: child -1 - forked process 4512 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 remote: hooks/pre-receive: fork: Resource temporarily unavailable To https://server/orga/TestApps.git ! [remote rejected] a14e8311b774f168351486aaa666aadd07bab129 -> master (pre-receive hook declined) error: failed to push some refs to 'https://server/orga/TestApps.git' #Return code: 1 and Cloning into '/data/workdir/git/repo'... remote: Enumerating objects: 20, done. remote: Counting objects: 100% (20/20), done. remote: Compressing objects: 100% (20/20), done. remote: Total 20 (delta 5), reused 0 (delta 0) Unpacking objects: 100% (20/20), done. [master 0d53eaf] Added submodule repo 2 files changed, 4 insertions(+) create mode 160000 repo Enumerating objects: 5, done. Counting objects: 100% (5/5), done. Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 429 bytes | 429.00 KiB/s, done. Total 3 (delta 1), reused 0 (delta 0) remote: 1 [main] bash 1576 fork: child -1 - forked process 4304 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 remote: ./hooks/update.d/gitea: fork: retry: Resource temporarily unavailable remote: 1077096 [main] bash 1576 fork: child -1 - forked process 3420 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 remote: ./hooks/update.d/gitea: fork: retry: Resource temporarily unavailable remote: 3267889 [main] bash 1576 fork: child -1 - forked process 5884 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 remote: ./hooks/update.d/gitea: fork: retry: Resource temporarily unavailable remote: 7526358 [main] bash 1576 fork: child -1 - forked process 5424 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 remote: ./hooks/update.d/gitea: fork: retry: Resource temporarily unavailable remote: 15650635 [main] bash 1576 fork: child -1 - forked process 4000 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 remote: ./hooks/update.d/gitea: fork: Resource temporarily unavailable remote: error: hook declined to update refs/heads/master To https://server/orga2/repo2 ! [remote rejected] master -> master (hook declined) error: failed to push some refs to 'https://server/orga2/repo2' #Return code: 1 For the latter error message I found `./hooks/update.d/gitea` on my server. So it seems to be a problem on the server side. Agreed? Content of `./hooks/update.d/gitea`: #!/usr/bin/env bash "D:/Bin/Gitea/gitea-1.5.1-windows-4.0-amd64.exe" hook --config='D:/Bin/Gitea/custom/conf/app.ini' update $1 $2 $3 This [SO entry](https://stackoverflow.com/questions/12079087/fork-retry-resource-temporarily-unavailable#12079684) suggests to increase the number of available file descriptors. How would this be possible on a Windows machine? Is there a configuration option for Gitea? Note: This is a temporary problem. When issueing the same command again, the problem usually does not occur again. Note2: The server has only limited resources. Which type of resource would I need to increase?
GiteaMirror added the type/questionissue/stale labels 2025-11-02 04:31:42 -06:00
Author
Owner

@stale[bot] commented on GitHub (Jan 11, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jan 11, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Feb 21, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Feb 21, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Author
Owner

@varunsridharan commented on GitHub (Oct 28, 2020):

I am facing the same issue but this happens random when opening the website !!

Error Log

 Stdout:
        Stderr:
        Err: fork/exec /usr/bin/git: resource temporarily unavailable
2020/10/28 09:04:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `repo_id`, `interval`, `enable_prune`, `updated_unix`, `next_update_unix` FROM `mirror` WHERE `repo_id`=? LIMIT 1 [670] - 33.687µs
2020/10/28 09:04:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `id`=? LIMIT 1 [670] - 50.202µs
2020/10/28 09:04:24 ...ces/mirror/mirror.go:192:runSync() [E] sanitizeOutput failed on stderr: fork/exec /usr/bin/git: resource temporarily unavailable
2020/10/28 09:04:24 ...ces/mirror/mirror.go:193:runSync() [E] Failed to update mirror repository &{670 338 hakimel <nil> css css Assorted CSS and UI experiments.  2 https://github.com/hakimel/css.git master 1 1 0 0 0 0 0 0 0 0 0 0 false false false true <nil> 0 map[] map[] [] <nil> false 0 <nil> false 0 <nil> 338064 <nil> <nil> false false [starred-repo starred-hakimel-repo]  1602589009 1599245982}:
        Stdout:
        Stderr:
        Err: fork/exec /usr/bin/git: resource temporarily unavailable
2020/10/28 09:04:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `repo_id`, `interval`, `enable_prune`, `updated_unix`, `next_update_unix` FROM `mirror` WHERE `repo_id`=? LIMIT 1 [372] - 33.244µs
2020/10/28 09:04:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `id`=? LIMIT 1 [372] - 43.467µs
2020/10/28 09:04:24 ...ces/mirror/mirror.go:192:runSync() [E] sanitizeOutput failed on stderr: fork/exec /usr/bin/git: resource temporarily unavailable
2020/10/28 09:04:24 ...ces/mirror/mirror.go:193:runSync() [E] Failed to update mirror repository &{372 121 petrk94 <nil> ownhealthrecord ownhealthrecord This repository is about the OwnHealthRecord Application Web App  2 https://github.com/petrk94/ownhealthrecord.git master 1 1 0 0 0 0 0 0 0 0 0 0 false false false true <nil> 0 map[] map[] [] <nil> false 0 <nil> false 0 <nil> 3239115 <nil> <nil> false false [starred-repo php html self-hosted selfhosted mysql medical medical-application webapp health healthrecord medical-record health-record medicine medicalrecord starred-petrk94-repo]  1602586797 1555595190}:
        Stdout:
        Stderr:
        Err: fork/exec /usr/bin/git: resource temporarily unavailable
2020/10/28 09:04:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `repo_id`, `interval`, `enable_prune`, `updated_unix`, `next_update_unix` FROM `mirror` WHERE `repo_id`=? LIMIT 1 [672] - 33.361µs
2020/10/28 09:04:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `id`=? LIMIT 1 [672] - 47.515µs
2020/10/28 09:04:24 ...ces/mirror/mirror.go:192:runSync() [E] sanitizeOutput failed on stderr: fork/exec /usr/bin/git: resource temporarily unavailable
2020/10/28 09:04:24 ...ces/mirror/mirror.go:193:runSync() [E] Failed to update mirror repository &{672 363 xwp <nil> wp-jquery-ui-datepicker-skins wp-jquery-ui-datepicker-skins jQuery UI datepicker skins for WordPress Admin color schemes  2 https://github.com/xwp/wp-jquery-ui-datepicker-skins.git master 1 1 0 0 0 0 0 0 0 0 0 0 false false false true <nil> 0 map[] map[] [] <nil> false 0 <nil> false 0 <nil> 692098 <nil> <nil> false false [starred-repo starred-xwp-repo]  1602589014 1455741233}:
        Stdout:

@varunsridharan commented on GitHub (Oct 28, 2020): I am facing the same issue but this happens random when opening the website !! ### Error Log ``` Stdout: Stderr: Err: fork/exec /usr/bin/git: resource temporarily unavailable 2020/10/28 09:04:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `repo_id`, `interval`, `enable_prune`, `updated_unix`, `next_update_unix` FROM `mirror` WHERE `repo_id`=? LIMIT 1 [670] - 33.687µs 2020/10/28 09:04:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `id`=? LIMIT 1 [670] - 50.202µs 2020/10/28 09:04:24 ...ces/mirror/mirror.go:192:runSync() [E] sanitizeOutput failed on stderr: fork/exec /usr/bin/git: resource temporarily unavailable 2020/10/28 09:04:24 ...ces/mirror/mirror.go:193:runSync() [E] Failed to update mirror repository &{670 338 hakimel <nil> css css Assorted CSS and UI experiments. 2 https://github.com/hakimel/css.git master 1 1 0 0 0 0 0 0 0 0 0 0 false false false true <nil> 0 map[] map[] [] <nil> false 0 <nil> false 0 <nil> 338064 <nil> <nil> false false [starred-repo starred-hakimel-repo] 1602589009 1599245982}: Stdout: Stderr: Err: fork/exec /usr/bin/git: resource temporarily unavailable 2020/10/28 09:04:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `repo_id`, `interval`, `enable_prune`, `updated_unix`, `next_update_unix` FROM `mirror` WHERE `repo_id`=? LIMIT 1 [372] - 33.244µs 2020/10/28 09:04:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `id`=? LIMIT 1 [372] - 43.467µs 2020/10/28 09:04:24 ...ces/mirror/mirror.go:192:runSync() [E] sanitizeOutput failed on stderr: fork/exec /usr/bin/git: resource temporarily unavailable 2020/10/28 09:04:24 ...ces/mirror/mirror.go:193:runSync() [E] Failed to update mirror repository &{372 121 petrk94 <nil> ownhealthrecord ownhealthrecord This repository is about the OwnHealthRecord Application Web App 2 https://github.com/petrk94/ownhealthrecord.git master 1 1 0 0 0 0 0 0 0 0 0 0 false false false true <nil> 0 map[] map[] [] <nil> false 0 <nil> false 0 <nil> 3239115 <nil> <nil> false false [starred-repo php html self-hosted selfhosted mysql medical medical-application webapp health healthrecord medical-record health-record medicine medicalrecord starred-petrk94-repo] 1602586797 1555595190}: Stdout: Stderr: Err: fork/exec /usr/bin/git: resource temporarily unavailable 2020/10/28 09:04:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `repo_id`, `interval`, `enable_prune`, `updated_unix`, `next_update_unix` FROM `mirror` WHERE `repo_id`=? LIMIT 1 [672] - 33.361µs 2020/10/28 09:04:24 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` WHERE `id`=? LIMIT 1 [672] - 47.515µs 2020/10/28 09:04:24 ...ces/mirror/mirror.go:192:runSync() [E] sanitizeOutput failed on stderr: fork/exec /usr/bin/git: resource temporarily unavailable 2020/10/28 09:04:24 ...ces/mirror/mirror.go:193:runSync() [E] Failed to update mirror repository &{672 363 xwp <nil> wp-jquery-ui-datepicker-skins wp-jquery-ui-datepicker-skins jQuery UI datepicker skins for WordPress Admin color schemes 2 https://github.com/xwp/wp-jquery-ui-datepicker-skins.git master 1 1 0 0 0 0 0 0 0 0 0 0 false false false true <nil> 0 map[] map[] [] <nil> false 0 <nil> false 0 <nil> 692098 <nil> <nil> false false [starred-repo starred-xwp-repo] 1602589014 1455741233}: Stdout: ```
Author
Owner

@techknowlogick commented on GitHub (Oct 28, 2020):

Please don’t comment on closed issues, your report will be lost. Instead please open a new issue and fill out the issue template completely

@techknowlogick commented on GitHub (Oct 28, 2020): Please don’t comment on closed issues, your report will be lost. Instead please open a new issue and fill out the issue template completely
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2298