We are running subgit on gitlab to mirror our subversion repos to git. (Read only at the moment)
After restarting the gitlab docker I run a script to sync all repositories but sometimes some of the syncs fail with the following message
SubGit version 3.3.6 ('Bobique') build #4276
Scheduling sync... error: Failed to open connection to the daemon 'pid=1311; port=40031; address=127:0:0:1; user=git'.
error: Connection refused (Connection refused)
error: Unexpected error has occurred; please report along with the logs ('/var/opt/gitlab/git-data/repositories/mikado/subgit-fetch-20191128-123259.zip')
error: to http://issues.tmatesoft.com/, thank you!
this may happen due to asynchronous fetch start, the daemon may still running. As a workaround try to change the script removing the --async option. Also, it would worth to set daemon.idleTimeout to 0 in the SubGit configuration file:
[daemon]
idleTimeout = 0
If it doesn’t help describe your setup and circumstances in a little more detail: do I understand correctly you run this Gitlab docker container on Linux host? Is that script is a startup script to trigger the mirroring or you run it otherwise? Did I understand correctly that the issue happens in the same repositories all the times, but the affected repositories set changes with docker container updates?
If I remove the --async option, will it sync only once or continuously? We run this script manually once after rebooting our Gitlab docker container on Linux but the intention is to automate this as a startup script.
I removed the --async part but it still fails for two out of eleven repos with the same error message. I then ran the script again and the same two repos failed to sync again. The first one that fails is our biggest one (but still only 4k commits)
I now looked at htop and see about 22 java instances of subgit looking at only two repos? each consumes about 600mb of ram
The --async option only tells SubGit not to block execution, but the command itself will only run once, not continuously. As for the test – could you advise please have you changed the daemon.idleTimeout setting as well? Judging from that you have 22 Java processes, it appears that this settings hasn’t been changes, could you please try it, too?
Hello Simon,
could you advise please, have you run ‘subgit install’ against the repositories to apply the setting? If not, it might happen that it wasn’t applied and thus inactive. If the setting was applied but the daemon process is still there, please collect logs from those repositories (assistant.git and documentation.git) and also from the failing one.