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

Re: Potential regression: high server-side memory consumption during import

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 2 Mar 2018 18:35:09 +0100

On Fri, Mar 02, 2018 at 03:56:40PM +0000, Philip Martin wrote:
> Evgeny Kotkov <evgeny.kotkov_at_visualsvn.com> writes:
>
> > Perhaps, a simpler reproduction script would be to issue an 'svn log' for
> > a medium-sized repository. In my environment, doing so for the trunk of
> > TortoiseSVN's repository with 25,000 revisions causes the httpd process
> > to consume up to a 1 GB of RAM while processing the request. Overall,
> > the log takes around 11 seconds instead of 2, compared to 1.9.7.
>
> I can reproduce the problem in my environment using my mirror of
> Subversion. Running log with authz configured causes apache to use
> several GB of memory, that's for about 81,500 revisions. Reverting
> r1779188 and r1778923 solves the memory growth problem.

Hmmm. Does this help? The authz_tests pass with it.

Index: subversion/mod_authz_svn/mod_authz_svn.c
===================================================================
--- subversion/mod_authz_svn/mod_authz_svn.c (revision 1825730)
+++ subversion/mod_authz_svn/mod_authz_svn.c (working copy)
@@ -395,10 +395,11 @@ resolve_repos_relative_url(const char **path, cons
 }
 
 /*
- * Get the, possibly cached, svn_authz_t for this request.
+ * Get the svn_authz_t for this request.
  */
 static svn_authz_t *
 get_access_conf(request_rec *r, authz_svn_config_rec *conf,
+ apr_pool_t *result_pool,
                 apr_pool_t *scratch_pool)
 {
   const char *access_file;
@@ -467,7 +468,7 @@ get_access_conf(request_rec *r, authz_svn_config_r
   svn_err = svn_repos_authz_read3(&access_conf,
                                   access_file, groups_file,
                                   TRUE, NULL,
- r->connection->pool, scratch_pool);
+ result_pool, scratch_pool);
 
   if (svn_err)
     {
@@ -687,7 +688,7 @@ req_check_access(request_rec *r,
     }
 
   /* Retrieve/cache authorization file */
- access_conf = get_access_conf(r,conf, r->pool);
+ access_conf = get_access_conf(r,conf, r->pool, r->pool);
   if (access_conf == NULL)
     return DECLINED;
 
@@ -804,7 +805,7 @@ subreq_bypass2(request_rec *r,
     }
 
   /* Retrieve authorization file */
- access_conf = get_access_conf(r, conf, scratch_pool);
+ access_conf = get_access_conf(r, conf, scratch_pool, scratch_pool);
   if (access_conf == NULL)
     return HTTP_FORBIDDEN;
 
Received on 2018-03-02 18:35:29 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.