Question

I am facing a very weird problem: I am using mailer.py as post-commit hooks to send codes diff to developers. But then I find all codes check-in to this repository is very slow, even 1 file check in will cost around 2 minutes. Disable the post-commit will make codes check-in much faster. I check the apache log and subversion log but find nothing valuable. Can anyone give some idea about this problem?

Environment: Redhat EL 5.4 + CollabNet SubversionEdge 2.0

Thanks,

Jeffrey

Was it helpful?

Solution

Perhaps you can spawn off the diff and mailer task as separate processes from the post-commit script. That way the checkin process can finish and return while the lengthy operations continue as a background task.

OTHER TIPS

I was just facing the same problem. The mailer.py used to work just fine, with almost immediate commits, but after deploying a new authentication schema that incorporated a faulty automount entry, it started to slow down to minutes.
It all boiled down to the mailer.py testing for some libraries, as running it through strace revealed.

As part of the post-commit hook, that normally would run the mailer.py, I inserted a strace just like:

# EXAMPLE OF DOING STRACE TO DEBUG/TROUBLESHOOT THIS:
/usr/bin/strace /usr/share/doc/subversion-1.6.11/tools/hook-scripts/mailer/mailer.py commit "$REPOS" "$REV" > /tmp/zzSTRACE-MAILER 2>&1
# (The original line is)
# /usr/share/doc/subversion-1.6.11/tools/hook-scripts/mailer/mailer.py commit "$REPOS" "$REV"


This showed the script looking for the os.py and os.pyc files under several locations (in my CentOS 6 system they are under /usr/lib64/python2.6).
One of the searched locations is /users which was in the automount map pointing to an unresponsive server. It thus hung until timing it out - then the script continued & the commit operation finished OK - only with that enormous delay.

Repairing the automount entry / fixing that server immediately solved the issue.
Hopefully this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top