[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

fork/exec for hooks scripts with a large FSFS cache

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 13 Nov 2012 21:30:00 +0000

If I configure a server with an FSFS cache that uses about 50% of
available memory and then I use the server so the cache is in use I find
that hook scripts fail to run because the fork/exec cannot allocate
memory. The user sees:

$ svn mkdir -mm http://localhost:8888/obj/repo/A
svn: E165002: Failed to start '/home/pm/sw/subversion/obj/repo/hooks/pre-commit' hook

and the apache log contains:

[Tue Nov 13 21:14:28 2012] [error] [client ::1] Could not MERGE resource "/obj/repo/!svn/txn/0-1" into "/obj/repo". [409, #0]
[Tue Nov 13 21:14:28 2012] [error] [client ::1] An error occurred while committing the transaction. [409, #165002]
[Tue Nov 13 21:14:28 2012] [error] [client ::1] Failed to start '/home/pm/sw/subversion/obj/repo/hooks/pre-commit' hook [409, #165002]
[Tue Nov 13 21:14:28 2012] [error] [client ::1] Can't start process '/home/pm/sw/subversion/obj/repo/hooks/pre-commit': Cannot allocate memory [409, #12]

If I increase the available memory by adding swap the hook script
starts.

Perhaps we could start up a separate hook script process before
allocating the large FSFS cache and then delegate the fork/exec to that
smaller process?

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2012-11-13 22:30:39 CET

This is an archived mail posted to the Subversion Dev mailing list.