Timeout with git clone

Mads Kiilerich mads at kiilerich.com
Mon Apr 17 11:15:25 UTC 2023


Hi

I haven't seen that problem and can't reproduce it.

The wait for 10 seconds in some pretty obscure code came from a comment 
in 
https://kallithea-scm.org/repos/kallithea/changeset/034e4fe1ebb2#rhodecodelibsubprocessiopy_n127 
before The Big Fork. The comment became reality in 
https://kallithea-scm.org/repos/kallithea/changeset/01aca0a4f876#kallithealibvcssubprocessiopy_n125 
when moving to Python 3. It doesn't seem to have caused problems so far, 
but I might have been too naive and trusted the comment too much.

Does it work better for you if changing it back:

                  kr.wait(2)

-                if not kr.wait(10):

+                if len(t) > ccm + 3:

                      raise IOError(

                          "Timed out while waiting for input from subprocess.")



I don't see why that should be a good change, but perhaps it fixes your 
issue.

Please let me know if you think I should push 
https://kallithea-scm.org/repos/kallithea-incoming/changeset/35e5c3dcec22 .

/Mads


On 15/04/2023 01:21, Quentin Wenger wrote:
> Hi,
>
> When cloning a medium-sized repo (not extremely large but with a couple heavy media files), I consistently get a timeout preventing the cloning from completing.
>
> Client:
>> $ git clonehttps://user@domain/main_website
>> Cloning into 'main_website'...
>> Password for 'https://user@domain':
>> remote: Enumerating objects: 10798, done.
>> remote: Counting objects: 100% (10798/10798), done.
>> remote: Compressing objects: 100% (5199/5199), done.
>> fetch-pack: unexpected disconnect while reading sideband packet
>> fatal: early EOF
>> fatal: fetch-pack: invalid index-pack output
> The error occurs during the "Receiving objects:" phase, around 60%.
>
> Server log with DEBUG:
>> 2023-04-14 19:05:26.748 INFO  [kallithea.controllers.base] pull action on git repo "main_website" by "user" from IP
>> 2023-04-14 19:05:26.748 DEBUG [kallithea.config.middleware.pygrack] handling cmd ['git', 'upload-pack', '--stateless-rpc', '/home/domain/hosting_kallithea/repos/main_website']
>> Exception in thread Thread-6:
>> Traceback (most recent call last):
>>    File "/opt/alt/python310/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner
>>      self.run()
>>    File "/home/domain/hosting_kallithea/source/kallithea/lib/vcs/subprocessio.py", line 129, in run
>>      raise IOError(
>> OSError: Timed out while waiting for input from subprocess.
>> [UID:1552][1444643] Child process with pid: 1444662 was killed by signal: 15, core dumped: no
> Cloning via git+ssh directly instead of the https protocol works fine.
>
> Has this been experienced before?
> Is this just a matter of using a longer timeout value on line 128 of kallithea/lib/vcs/subprocessio.py? How was the value 10 seconds chosen in the first place? What about making it configurable if it is arbitrary?
>
> Thanks,
> Quentin
> _______________________________________________
> kallithea-general mailing list
> kallithea-general at sfconservancy.org
> https://lists.sfconservancy.org/mailman/listinfo/kallithea-general

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20230417/29630158/attachment.html>


More information about the kallithea-general mailing list