Opened 15 years ago

Closed 14 years ago

#1555 closed defect (fixed)

svnserv leaves unconnected children that eat up memory

Reported by: attila@… Owned by: attila@…
Priority: normal Component: administration
Version: unspecified Severity: minor
Keywords: Cc: diego@…, mans@…
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

some percentage of the svn processes do not exit regularly after
all connections have been closed and lie around, eating up memory.

Change History (2)

comment:1 by attila@…, 14 years ago

Status: newassigned

Got the following patch from stsp on #svn

Index: subversion/svnserve/main.c
===================================================================
--- subversion/svnserve/main.c (revision 40446)
+++ subversion/svnserve/main.c (working copy)
@@ -778,6 +778,20 @@ int main(int argc, const char *argv[])

return svn_cmdline_handle_exit_error(err, pool, "svnserve: ");

}


+ /* Enable TCP keep-alives on the socket so we time out when
+ * the connection breaks due to network-layer problems.
+ * If the peer has dropped the connection due to a network partition
+ * or a crash, or if the peer no longer considers the connection
+ * valid because we are behind a NAT and our public IP has changed,
+ * it will respond to the keep-alive probe with a RST instead of an
+ * acknowledgment segment, which will cause svn to abort the session
+ * even while it is currently blocked waiting for data from the peer. */
+ status = apr_socket_opt_set(usock, APR_SO_KEEPALIVE, 1);
+ if (status)
+ {
+ /* It's not a fatal error if we cannot enable keep-alives. */
+ }
+

conn = svn_ra_svn_create_conn(usock, NULL, NULL, connection_pool);


if (run_mode == run_mode_listen_once)

comment:2 by attila@…, 14 years ago

Resolution: fixed
Status: assignedclosed

seems to be fixed... no idea how though

Note: See TracTickets for help on using tickets.