You are not logged in.
Pages: 1
Topic closed
Hey,
I've got a vimwiki work log/diary that I sync to/from my server from a couple of different computers every 15 minutes with a scripted cron-based automatic git pull/git push. (the $status and tsocks are just for tunnelling purposes outide my home network
#!/bin/sh
type -P keychain &>/dev/null || { echo "I require keychain but it's not installed. Aborting." >&2; exit 1; }
eval `keychain --noask --eval --agents ssh id_rsa` || exit 1
local="$HOME/.local/share/vimwiki"
status=`ping -qc1 google.com 2> /dev/null`
ts=tsocks
hash $ts 2>&- || { ts=""; }
if [ -n "$status" ]; then
cd "$local"
git add .
git commit -a -m 'Autocommit'
$ts git pull
$ts git push
else
exit 11 # I think this is the cron exit code to try again
fi
It works great, but once or twice a week I get this process
ssh homeserver git-upload-pack '/srv/git/vimwiki'
that eats a lot of CPU cycles (like 20-30%!) and will run for hours (I've let it go for 6 hours before) without ever finishing. I've always had to kill the process. The cron job that runs the script runs every 15 minutes, but that's it...there's no other git-related jobs that I'm aware of in my crontab or in the root crontab.
Any ideas on what this is, why it never finishes and how to make it stop?
Thanks!
Scott
Offline
I'm still looking for a solution to this issue. Again, I have a cronjob that pulls/pushes from/to a bare git repo on my server every 15 minutes to sync changes to my vimwiki. I get something like this in my process tree:
1000 373 0.0 0.1 20436 1312 ? S 13:27 0:00 git pull
1000 374 0.0 0.1 13816 1600 ? S 13:27 0:00 /bin/sh /usr/lib/git-core/git-pull
1000 392 0.0 0.1 20704 1688 ? S 13:27 0:00 git fetch --update-head-ok
1000 393 33.1 0.2 36872 2328 ? R 13:27 39:18 ssh homeserver git-upload-pack '/srv/git/vimwiki'
Note: homeserver is my ssh shortcut for logging in to the server with keys stored in keychain/ssh-agent.
Today it's now decided to startup this git-upload-pack every time the cronjob wants to sync, and it's driving me nuts!! The git-upload-pack command looks like it is freezing, because it just hangs if I run it by itself.
A couple of months ago I also started doing a cron job that runs 'git gc --agressive --quiet' in the worktree on my laptop once a day. I was hoping this would fix whatever was causing the stuck 'git-upload-pack' but it didn't
Googling this is getting me nowhere...no one seems to have a similar issue. It happens on both my laptop and desktop so it's got to be something with the frequent empty commits perhaps? The git log only shows commits that actually contained some changes, and the worktree .git directory isn't huge, so I know that it's being pruned regularly and not retaining empty commits or something.
Any ideas??
Thanks, Scott
Offline
git-push calls git-upload-pack. It's clear that this process is hanging.
Also, I have personal experience with the --aggressive flag for git gc. I suggest not using it.
Offline
Interesting...although I haven't noticed your issue in the last couple of months of daily gc --aggressive use on 2 machines. I only started using git gc --agressive to try and curb the stuck git-upload-pack. Someone on #git suggested running 'git fsck; git repack -adf' on all my repositories (although he wasn't sure what the exact issue might be). I'll try that for now (I put those along with the git gc into a weekly cron job) and see how it goes.
No idea why it might be stuck, though? It started happening months before I ever used 'git gc' at all.
Thanks,
Scott
Offline
I know this is super old, but just happened on my home server.
What fixed for me was making sure Jenkins was running as the user that had proper access to my GIT repositories.
Hopefully that will help someone
Offline
Thank you for sharing that insight. As this is an old thread, I'm going to close it now.
https://wiki.archlinux.org/index.php/Fo … bumping.22
Closing.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed