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

Re: fork/exec for hooks scripts with a large FSFS cache

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Wed, 14 Nov 2012 01:37:16 +0100

On Tue, Nov 13, 2012 at 10:30 PM, Philip Martin
<philip.martin_at_wandisco.com>wrote:

> 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:
>

I only discovered a few days ago that hook scripts
get their own "host" process instance. If they use
the same cache setup, that's a problem. Even if
there is enough memory, allocating the memory
alone may cause a performance hit.

> $ 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?
>

I wonder whether there is a way to pass a different
cache setting to the sub-process.

-- Stefan^2.

-- 
Certified & Supported Apache Subversion Downloads:
*
http://www.wandisco.com/subversion/download
*
Received on 2012-11-14 01:37:48 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.