You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Maurer, Hermann" <He...@gft.com> on 2007/07/10 13:33:40 UTC

Apache + Subversion use too much memory

Hi folks,

I've been watching a strange behaviour of my subversion server.
Sometimes the apache processes use almost all virtual memory. I think,
that the problem is caused by some ldap or subversion module's issue,
because I see a lot of open connections to our ldap server (Active
Directory), which the users authenticate themselfs against. Has anybody
from you have a problem like this and solved it ? Any help would be very
appreciated.

My configuration is as following:

Hardware:
DELL PE 2950 
Intel(R) Xeon(R) CPU 5130  @ 2.00GHz
1 Gbyte RAM + 2 Gbyte Swap

Software:
SuSE Linux 10.2 (i386)
Apache/2.0.59 (Unix) DAV/2 mod_ssl/2.0.59 OpenSSL/0.9.8d SVN/1.4.3
mod_bw/0.8
OpenLDAP Libs 2.3.27

top shows the following:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

12002 wwwrun    21   0  782m 334m 3020 S    0 33.0   4:37.08 httpd

12221 wwwrun    23   0  655m 327m 2972 S    0 32.4   6:38.63 httpd

30282 wwwrun    15   0  450m 4808 2944 S    0  0.5   2:28.12 httpd

11013 wwwrun    16   0  391m 9808 3028 S    0  0.9   2:26.50 httpd

21926 root      17   0  105m  736  520 S    0  0.1   0:03.27 nscd

15917 wwwrun    25   0  102m  78m 2972 S    0  7.8   0:21.79 httpd

10920 wwwrun    15   0 47172 4908 2976 S    0  0.5   1:27.72 httpd

12157 wwwrun    15   0 41468 4744 2908 S    0  0.5   0:15.23 httpd

15789 wwwrun    15   0 36032  22m 2996 S    0  2.2   0:06.06 httpd


netstat -tpn shows this:

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address
State       PID/Program name   
tcp        1      0 192.168.1.2:39784       192.168.1.99:389
CLOSE_WAIT  30282/httpd         
tcp        1      0 192.168.1.2:39783       192.168.1.99:389
CLOSE_WAIT  12221/httpd         
tcp        1      0 192.168.1.2:39782       192.168.1.99:389
CLOSE_WAIT  30282/httpd         
tcp        1      0 192.168.1.2:40600       192.168.1.99:389
CLOSE_WAIT  15917/httpd         
tcp        1      0 192.168.1.2:40598       192.168.1.99:389
CLOSE_WAIT  30282/httpd         
tcp        1      0 192.168.1.2:47659       192.168.1.99:389
CLOSE_WAIT  12002/httpd         
tcp        1      0 192.168.1.2:47657       192.168.1.99:389
CLOSE_WAIT  15917/httpd         
tcp        1      0 192.168.1.2:41262       192.168.1.99:389
CLOSE_WAIT  12002/httpd         
tcp        0      0 192.168.1.2:41221       192.168.1.99:389
ESTABLISHED 12002/httpd         
tcp        0      0 192.168.1.2:41220       192.168.1.99:389
ESTABLISHED 11013/httpd         
tcp        0      0 192.168.1.2:41222       192.168.1.99:389
ESTABLISHED 12157/httpd         
tcp        0      0 192.168.1.2:41224       192.168.1.99:389
ESTABLISHED 11013/httpd         
tcp        1      0 192.168.1.2:44541       192.168.1.99:389
CLOSE_WAIT  11013/httpd         
tcp        1      0 192.168.1.2:44542       192.168.1.99:389
CLOSE_WAIT  10920/httpd         
tcp        1      0 192.168.1.2:44060       192.168.1.99:389
CLOSE_WAIT  12157/httpd         
tcp        1      0 192.168.1.2:44648       192.168.1.99:389
CLOSE_WAIT  12157/httpd         
tcp        1      0 192.168.1.2:57201       192.168.1.99:389
CLOSE_WAIT  15789/httpd         
tcp        1      0 192.168.1.2:58676       192.168.1.99:389
CLOSE_WAIT  10920/httpd         
tcp        1      0 192.168.1.2:59512       192.168.1.99:389
CLOSE_WAIT  15789/httpd         
tcp        1      0 192.168.1.2:59514       192.168.1.99:389
CLOSE_WAIT  12221/httpd         
tcp        1      0 192.168.1.2:59515       192.168.1.99:389
CLOSE_WAIT  10920/httpd  
tcp        0   8303 192.168.1.2:443         192.168.2.11:1620
ESTABLISHED 15917/httpd       

In the apache logfiles I cannot see any suspicious lines but some
authentication errors (wrong username or password). 

thank you very much !

Kind Regards,
Hermann Maurer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Apache + Subversion use too much memory

Posted by Ramanathan Muthaiah <ru...@gmail.com>.
> that the problem is caused by some ldap or subversion module's issue,
> because I see a lot of open connections to our ldap server (Active
> Directory), which the users authenticate themselfs against. Has anybody
> from you have a problem like this and solved it ? Any help would be very
> appreciated.
>
> My configuration is as following:
>
> Hardware:
> DELL PE 2950
> Intel(R) Xeon(R) CPU 5130  @ 2.00GHz
> 1 Gbyte RAM + 2 Gbyte Swap
>
> Software:
> SuSE Linux 10.2 (i386)
> Apache/2.0.59 (Unix) DAV/2 mod_ssl/2.0.59 OpenSSL/0.9.8d SVN/1.4.3
> mod_bw/0.8
> OpenLDAP Libs 2.3.27
>
> top shows the following:
>
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>
> 12002 wwwrun    21   0  782m 334m 3020 S    0 33.0   4:37.08 httpd
>
> 12221 wwwrun    23   0  655m 327m 2972 S    0 32.4   6:38.63 httpd
>
> 30282 wwwrun    15   0  450m 4808 2944 S    0  0.5   2:28.12 httpd
>
> 11013 wwwrun    16   0  391m 9808 3028 S    0  0.9   2:26.50 httpd
>
> 21926 root      17   0  105m  736  520 S    0  0.1   0:03.27 nscd
>
> 15917 wwwrun    25   0  102m  78m 2972 S    0  7.8   0:21.79 httpd
>
> 10920 wwwrun    15   0 47172 4908 2976 S    0  0.5   1:27.72 httpd
>
> 12157 wwwrun    15   0 41468 4744 2908 S    0  0.5   0:15.23 httpd
>
> 15789 wwwrun    15   0 36032  22m 2996 S    0  2.2   0:06.06 httpd

Am not sure if this may help, but have you tried running less number
of httpd instances.

/Ram

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Apache + Subversion use too much memory

Posted by Greg Thomas <th...@omc.bt.co.uk>.
On Fri, 13 Jul 2007 09:28:05 +0200, "Maurer, Hermann"
<He...@gft.com> wrote:

>thank you for your hint. I agree with you, that mod_ldap seems to make
>troubles. I cannot give up the ldap authentication.

mod_ldap is IIRC experimental under Apache 2.0. An upgrade to 2.2
where it becomes mainstream may help.

Greg
-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Apache + Subversion use too much memory

Posted by "Maurer, Hermann" <He...@gft.com>.
->
->I am running a quite busy subversion server on the same SuSE release,
->on a machine quite like yours, but with plain file authn instead of
->LDAP. The apache parameters are the defaults, and my processes
->(httpd2-prefork) all use around 20m. My guess is that your memory
->usage is because of ldap, not the svn modules. Have you tried to use
->the same LDAP settings on a Location that is not served by dav_svn?
->
->/Staffan
Hi Staffan,

thank you for your hint. I agree with you, that mod_ldap seems to make
troubles. I cannot give up the ldap authentication. Unfortunately the
problem is so diffuse, that it's very hard to understand the reason.
Sometimes the server runs a day and the memory usage is ok. But it
happens sometimes, that almost 95-100% of the memory have been eaten
within minutes. 

Please look at this:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
23044 wwwrun    15   0  729m 127m 3272 S    0 12.6   7:05.66 httpd

22746 wwwrun    15   0  367m 271m 3228 S    0 26.9   3:17.86 httpd

28483 wwwrun    15   0  300m 264m 3100 S    0 26.2   1:47.89 httpd


The first process is doing definitely nothing:
# strace -p 23044
Process 23044 attached - interrupt to quit
semop(5308419, 0xb7d3654c, 1

# netstat -tp | grep 23044
tcp        1      0 192.168.1.2:44903 192.168.1.99:ldap CLOSE_WAIT
23044/httpd         
tcp        1      0 192.168.1.2:51753 192.168.1.99:ldap CLOSE_WAIT
23044/httpd         

I'm lost and don't know wehre should I search for the reason.

Regards,
Hermann Maurer

->
->On 7/10/07, Maurer, Hermann <He...@gft.com> wrote:
->> Hi folks,
->>
->> I've been watching a strange behaviour of my subversion server.
->> Sometimes the apache processes use almost all virtual 
->memory. I think,
->> that the problem is caused by some ldap or subversion 
->module's issue,
->> because I see a lot of open connections to our ldap server (Active
->> Directory), which the users authenticate themselfs against. 
->Has anybody
->> from you have a problem like this and solved it ? Any help 
->would be very
->> appreciated.
->>
->> My configuration is as following:
->>
->> Hardware:
->> DELL PE 2950
->> Intel(R) Xeon(R) CPU 5130  @ 2.00GHz
->> 1 Gbyte RAM + 2 Gbyte Swap
->>
->> Software:
->> SuSE Linux 10.2 (i386)
->> Apache/2.0.59 (Unix) DAV/2 mod_ssl/2.0.59 OpenSSL/0.9.8d SVN/1.4.3
->> mod_bw/0.8
->> OpenLDAP Libs 2.3.27
->>
->> top shows the following:
->>
->>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
->>
->> 12002 wwwrun    21   0  782m 334m 3020 S    0 33.0   4:37.08 httpd
->>
->> 12221 wwwrun    23   0  655m 327m 2972 S    0 32.4   6:38.63 httpd
->>
->> 30282 wwwrun    15   0  450m 4808 2944 S    0  0.5   2:28.12 httpd
->>
->> 11013 wwwrun    16   0  391m 9808 3028 S    0  0.9   2:26.50 httpd
->>
->> 21926 root      17   0  105m  736  520 S    0  0.1   0:03.27 nscd
->>
->> 15917 wwwrun    25   0  102m  78m 2972 S    0  7.8   0:21.79 httpd
->>
->> 10920 wwwrun    15   0 47172 4908 2976 S    0  0.5   1:27.72 httpd
->>
->> 12157 wwwrun    15   0 41468 4744 2908 S    0  0.5   0:15.23 httpd
->>
->> 15789 wwwrun    15   0 36032  22m 2996 S    0  2.2   0:06.06 httpd
->>
->>
->> netstat -tpn shows this:
->>
->> Active Internet connections (w/o servers)
->> Proto Recv-Q Send-Q Local Address           Foreign Address
->> State       PID/Program name
->> tcp        1      0 192.168.1.2:39784       192.168.1.99:389
->> CLOSE_WAIT  30282/httpd
->> tcp        1      0 192.168.1.2:39783       192.168.1.99:389
->> CLOSE_WAIT  12221/httpd
->> tcp        1      0 192.168.1.2:39782       192.168.1.99:389
->> CLOSE_WAIT  30282/httpd
->> tcp        1      0 192.168.1.2:40600       192.168.1.99:389
->> CLOSE_WAIT  15917/httpd
->> tcp        1      0 192.168.1.2:40598       192.168.1.99:389
->> CLOSE_WAIT  30282/httpd
->> tcp        1      0 192.168.1.2:47659       192.168.1.99:389
->> CLOSE_WAIT  12002/httpd
->> tcp        1      0 192.168.1.2:47657       192.168.1.99:389
->> CLOSE_WAIT  15917/httpd
->> tcp        1      0 192.168.1.2:41262       192.168.1.99:389
->> CLOSE_WAIT  12002/httpd
->> tcp        0      0 192.168.1.2:41221       192.168.1.99:389
->> ESTABLISHED 12002/httpd
->> tcp        0      0 192.168.1.2:41220       192.168.1.99:389
->> ESTABLISHED 11013/httpd
->> tcp        0      0 192.168.1.2:41222       192.168.1.99:389
->> ESTABLISHED 12157/httpd
->> tcp        0      0 192.168.1.2:41224       192.168.1.99:389
->> ESTABLISHED 11013/httpd
->> tcp        1      0 192.168.1.2:44541       192.168.1.99:389
->> CLOSE_WAIT  11013/httpd
->> tcp        1      0 192.168.1.2:44542       192.168.1.99:389
->> CLOSE_WAIT  10920/httpd
->> tcp        1      0 192.168.1.2:44060       192.168.1.99:389
->> CLOSE_WAIT  12157/httpd
->> tcp        1      0 192.168.1.2:44648       192.168.1.99:389
->> CLOSE_WAIT  12157/httpd
->> tcp        1      0 192.168.1.2:57201       192.168.1.99:389
->> CLOSE_WAIT  15789/httpd
->> tcp        1      0 192.168.1.2:58676       192.168.1.99:389
->> CLOSE_WAIT  10920/httpd
->> tcp        1      0 192.168.1.2:59512       192.168.1.99:389
->> CLOSE_WAIT  15789/httpd
->> tcp        1      0 192.168.1.2:59514       192.168.1.99:389
->> CLOSE_WAIT  12221/httpd
->> tcp        1      0 192.168.1.2:59515       192.168.1.99:389
->> CLOSE_WAIT  10920/httpd
->> tcp        0   8303 192.168.1.2:443         192.168.2.11:1620
->> ESTABLISHED 15917/httpd
->>
->> In the apache logfiles I cannot see any suspicious lines but some
->> authentication errors (wrong username or password).
->>
->> thank you very much !
->>
->> Kind Regards,
->> Hermann Maurer
->>
->> 
->---------------------------------------------------------------------
->> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
->> For additional commands, e-mail: users-help@subversion.tigris.org
->>
->>
->

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Apache + Subversion use too much memory

Posted by Staffan Olsson <so...@gmail.com>.
I am running a quite busy subversion server on the same SuSE release,
on a machine quite like yours, but with plain file authn instead of
LDAP. The apache parameters are the defaults, and my processes
(httpd2-prefork) all use around 20m. My guess is that your memory
usage is because of ldap, not the svn modules. Have you tried to use
the same LDAP settings on a Location that is not served by dav_svn?

/Staffan

On 7/10/07, Maurer, Hermann <He...@gft.com> wrote:
> Hi folks,
>
> I've been watching a strange behaviour of my subversion server.
> Sometimes the apache processes use almost all virtual memory. I think,
> that the problem is caused by some ldap or subversion module's issue,
> because I see a lot of open connections to our ldap server (Active
> Directory), which the users authenticate themselfs against. Has anybody
> from you have a problem like this and solved it ? Any help would be very
> appreciated.
>
> My configuration is as following:
>
> Hardware:
> DELL PE 2950
> Intel(R) Xeon(R) CPU 5130  @ 2.00GHz
> 1 Gbyte RAM + 2 Gbyte Swap
>
> Software:
> SuSE Linux 10.2 (i386)
> Apache/2.0.59 (Unix) DAV/2 mod_ssl/2.0.59 OpenSSL/0.9.8d SVN/1.4.3
> mod_bw/0.8
> OpenLDAP Libs 2.3.27
>
> top shows the following:
>
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>
> 12002 wwwrun    21   0  782m 334m 3020 S    0 33.0   4:37.08 httpd
>
> 12221 wwwrun    23   0  655m 327m 2972 S    0 32.4   6:38.63 httpd
>
> 30282 wwwrun    15   0  450m 4808 2944 S    0  0.5   2:28.12 httpd
>
> 11013 wwwrun    16   0  391m 9808 3028 S    0  0.9   2:26.50 httpd
>
> 21926 root      17   0  105m  736  520 S    0  0.1   0:03.27 nscd
>
> 15917 wwwrun    25   0  102m  78m 2972 S    0  7.8   0:21.79 httpd
>
> 10920 wwwrun    15   0 47172 4908 2976 S    0  0.5   1:27.72 httpd
>
> 12157 wwwrun    15   0 41468 4744 2908 S    0  0.5   0:15.23 httpd
>
> 15789 wwwrun    15   0 36032  22m 2996 S    0  2.2   0:06.06 httpd
>
>
> netstat -tpn shows this:
>
> Active Internet connections (w/o servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address
> State       PID/Program name
> tcp        1      0 192.168.1.2:39784       192.168.1.99:389
> CLOSE_WAIT  30282/httpd
> tcp        1      0 192.168.1.2:39783       192.168.1.99:389
> CLOSE_WAIT  12221/httpd
> tcp        1      0 192.168.1.2:39782       192.168.1.99:389
> CLOSE_WAIT  30282/httpd
> tcp        1      0 192.168.1.2:40600       192.168.1.99:389
> CLOSE_WAIT  15917/httpd
> tcp        1      0 192.168.1.2:40598       192.168.1.99:389
> CLOSE_WAIT  30282/httpd
> tcp        1      0 192.168.1.2:47659       192.168.1.99:389
> CLOSE_WAIT  12002/httpd
> tcp        1      0 192.168.1.2:47657       192.168.1.99:389
> CLOSE_WAIT  15917/httpd
> tcp        1      0 192.168.1.2:41262       192.168.1.99:389
> CLOSE_WAIT  12002/httpd
> tcp        0      0 192.168.1.2:41221       192.168.1.99:389
> ESTABLISHED 12002/httpd
> tcp        0      0 192.168.1.2:41220       192.168.1.99:389
> ESTABLISHED 11013/httpd
> tcp        0      0 192.168.1.2:41222       192.168.1.99:389
> ESTABLISHED 12157/httpd
> tcp        0      0 192.168.1.2:41224       192.168.1.99:389
> ESTABLISHED 11013/httpd
> tcp        1      0 192.168.1.2:44541       192.168.1.99:389
> CLOSE_WAIT  11013/httpd
> tcp        1      0 192.168.1.2:44542       192.168.1.99:389
> CLOSE_WAIT  10920/httpd
> tcp        1      0 192.168.1.2:44060       192.168.1.99:389
> CLOSE_WAIT  12157/httpd
> tcp        1      0 192.168.1.2:44648       192.168.1.99:389
> CLOSE_WAIT  12157/httpd
> tcp        1      0 192.168.1.2:57201       192.168.1.99:389
> CLOSE_WAIT  15789/httpd
> tcp        1      0 192.168.1.2:58676       192.168.1.99:389
> CLOSE_WAIT  10920/httpd
> tcp        1      0 192.168.1.2:59512       192.168.1.99:389
> CLOSE_WAIT  15789/httpd
> tcp        1      0 192.168.1.2:59514       192.168.1.99:389
> CLOSE_WAIT  12221/httpd
> tcp        1      0 192.168.1.2:59515       192.168.1.99:389
> CLOSE_WAIT  10920/httpd
> tcp        0   8303 192.168.1.2:443         192.168.2.11:1620
> ESTABLISHED 15917/httpd
>
> In the apache logfiles I cannot see any suspicious lines but some
> authentication errors (wrong username or password).
>
> thank you very much !
>
> Kind Regards,
> Hermann Maurer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org