Clone fails with java.io.OutputStream.write for large repositories when scm-cache is enabled

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server と Data Center のみ - この記事は、サーバーおよびデータセンター プラットフォームのアトラシアン製品にのみ適用されます。

問題

Clone fails for large repositories.  

The following appears in the atlassian-bitbucket.log

2017-10-06 00:09:25,390 DEBUG [scm-request-poller:thread-1]  c.a.b.scm.ssh.SshCommandExitHandler {}: Threw the following exception:
com.atlassian.utils.process.ProcessException: Non-zero exit code: 128
	at com.atlassian.bitbucket.scm.SummarizingProcessHandler.complete(SummarizingProcessHandler.java:47)
	at com.atlassian.utils.process.ExternalProcessImpl.wrapUpProcess(ExternalProcessImpl.java:667)
	at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:194)
    ..
    ..
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.lang.Thread.run(Thread.java:748)
	... 5 frames trimmed
2017-10-06 00:09:25,390 INFO  [ssh-scm-request-handler] <user> @15FI10Xx9x437x0 1izd1l1 10.0.0.254 SSH - git-upload-pack '/<proj>/<repo>.git' c.a.u.c.internal.AbstractCacheEntry Invalidating cache entry clone|1c9e1be2b6dd70b129814c141385a39d. An error occurred while writing to the cache Write to closed pipe
2017-10-06 00:09:25,392 DEBUG [ssh-scm-request-handler] <user> @15FI10Xx9x437x0 1izd1l1 10.0.0.254 SSH - git-upload-pack '/<proj>/<repo>.git c.a.b.s.c.i.s.CachingSshUploadPackRequest [GA/ipad[63]] Exception encountered while processing a git-upload-pack request
java.io.IOException: Write to closed pipe
	at com.atlassian.util.contentcache.util.PipedStreams.writeBytesAvailable(PipedStreams.java:93)
	at com.atlassian.util.contentcache.util.PipedStreams.access$1100(PipedStreams.java:23)
	at com.atlassian.util.contentcache.util.PipedStreams$PipedOutputStream.awaitSpace(PipedStreams.java:284)
	at com.atlassian.util.contentcache.util.PipedStreams$PipedOutputStream.write(PipedStreams.java:232)
	at java.io.OutputStream.write(OutputStream.java:75)
	at com.atlassian.bitbucket.scm.cache.internal.ssh.UploadPackProxy.streamPack(UploadPackProxy.java:202)
	at com.atlassian.bitbucket.scm.cache.internal.ssh.CachingSshUploadPackRequest$PackContentProvider.lambda$apply$0(CachingSshUploadPackRequest.java:429)
	at com.atlassian.bitbucket.util.TimerUtils.time(TimerUtils.java:54)

診断

診断ステップ

  • scm-cache is enabled and clone fails for large repositories

原因

Buffer size limit have been enabled in sysctl.conf or in any other configuration files and set with low values

例:

net.core.rmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 16384 16777216

ソリューション

Remove if any buffer settings configured for hosting operating system.

 

最終更新日: 2017 年 10 月 13 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.