1

The SVN server in our company, which is self setup and hosted on EC2, is pretty slow. The setup is based on Apache and mod_dav_svn. There is also a svnserve running that seems to be used by the CI system. We can access the repositories using SSL with server and client certificates and I noticed a strange thing while monitoring a commit with Wireshark.

I would have expected that there is a SSL handshake to establish the connection and that that connection is reused over the session. However it seems that every 200ms/10kb there is a new TCP connection with new SSL handshake (which due to the certificates procuses a higher payload than SVN traffic itself).

Conversations during an SVN commit. Please note that for each connection there is at most 10kb of data transferred.

conversations during a commit

Begin of the commit as packets. As far as I can tell the server sends an encrypted alert to close the SSL connection. Then you see the next handshake...

enter image description here

Apache ssl.conf:

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

SSLVerifyClient optional
SSLUserName SSL_CLIENT_S_DN_CN
SSLCARevocationFile /etc/httpd/ssl/xxx-revoke.pem

<Location /svn/repos>
    DAV svn
    SVNPath /path/svn/repos
    SSLRequireSSL
    SSLRequire (%{SSL_CLIENT_S_DN_O} in {"c1", "c2"}) and !(%{SSL_CLIENT_S_DN_CN} in {"old1", "old2"})

   # Allow large files
   LimitXMLRequestBody 0
   LimitRequestBody 0
</Location>

I am using TortoiseSVN GUI/cli clients. My assumption it that there is a wrong configuration at server side, do you agree? Any hints?

2

Ok, so I already found the solution to those reconnects and don't delete the question in case someone else searchs for it.

httpd.conf

-KeepAlive Off
+KeepAlive On

-MaxKeepAliveRequests 100
+MaxKeepAliveRequests 1000

If KeepAlive is off, Apache closes the connection after each request, which is why we saw so many reconnects and certificates.

These and some other performance tips can be found in the SVN manual

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.