You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Geoff O'Callaghan <ge...@asri.org.au> on 2002/10/25 03:56:52 UTC

timeout on report

Hi,

I'm new to subversion so be gentle. :-)

I have a networked subversion repository on Linux.  I'm not sure how to
accurately tell the version of SVN. It's checked out of the repos and the
CHANGES file suggests that it's 0.14.3.

Anyway,  that's not the real problem .... on my remote system I try to do an
update and get

svn update
subversion/libsvn_ra_dav/util.c:332: (apr_err=175002, src_err=0)
svn: RA layer request failed
svn: REPORT request failed on /web-asri
subversion/libsvn_ra_dav/util.c:81: (apr_err=175002, src_err=0)
svn: REPORT of /web-asri: timed out waiting for server

Yes, it is a fairly large repository.  How can I change the appropriate
timeout values in i'm guessing neon?

Sorry for the vague newbie problem report

Cheers
Geoff


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

Re: [PATCH] Re: timeout on report

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Branko Čibej <br...@xbc.nu> writes:
> >Or do we just say, "it's still alpha, and it's changed"?
>
> This is my favourite.

I think it's fine too.  This list has proven its ability to deal
cheerfully with floods of repeated questions :-).

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

Re: [PATCH] Re: timeout on report

Posted by Philip Martin <ph...@codematters.co.uk>.
Branko Čibej <br...@xbc.nu> writes:

> >Or do we just say, "it's still alpha, and it's changed"?
> >
> 
> This is my favourite.

Me too, I'll work up a patch to change "proxies" to "servers".

-- 
Philip Martin

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

Re: [PATCH] Re: timeout on report

Posted by Branko Čibej <br...@xbc.nu>.
Philip Martin wrote:

>Branko ÄŒibej <br...@xbc.nu> writes:
>
>  
>
>>>#  define SVN_REGISTRY_CONFIG_PROXY_KEY "Proxies"
>>>
>>>      
>>>
>>Ah, now I understand which Windows stuff! Well, you just rename that
>>define, and there it is. Oh, and update the registry file on the
>>Subversion downloads page that's a template for quick-fixing proxy
>>configuration on Windows.
>>    
>>
>
>Which will break all the current Windows setups, yes?  So what about
>Karl's suggestion
>
In exactly the same way as renaming the file will break the current Unix 
and Windows setups. The registry on Windows is just an extra place to 
look for configuration (we have config files on Windows, too), and the 
registry keys should haave the same names as the config files.

>>>Karl Fogel <kf...@newton.ch.collab.net> writes:
>>>      
>>>
>>>>(We can always look
>>>>for `proxies' too for backwards compatibility).
>>>>        
>>>>
>
>I could probably do it for the file, but I'm not so sure about the
>registry.
>
Exactly the same way as for the files. All the config reading code is 
#ifdef'd to read from the registry, as necessary. It should be obvious 
what needs to be done.

>Or do we just say, "it's still alpha, and it's changed"?
>  
>
This is my favourite.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: [PATCH] Re: timeout on report

Posted by Philip Martin <ph...@codematters.co.uk>.
Branko Čibej <br...@xbc.nu> writes:

> >#  define SVN_REGISTRY_CONFIG_PROXY_KEY "Proxies"
> >
> Ah, now I understand which Windows stuff! Well, you just rename that
> define, and there it is. Oh, and update the registry file on the
> Subversion downloads page that's a template for quick-fixing proxy
> configuration on Windows.

Which will break all the current Windows setups, yes?  So what about
Karl's suggestion

> >Karl Fogel <kf...@newton.ch.collab.net> writes:
> >>(We can always look
> >>for `proxies' too for backwards compatibility).

I could probably do it for the file, but I'm not so sure about the
registry.

Or do we just say, "it's still alpha, and it's changed"?

-- 
Philip Martin

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

Re: [PATCH] Re: timeout on report

Posted by Branko Čibej <br...@xbc.nu>.
Philip Martin wrote:

>Karl Fogel <kf...@newton.ch.collab.net> writes:
>
>  
>
>>Philip Martin <ph...@codematters.co.uk> writes:
>>    
>>
>>>>I wonder if this
>>>>should be configurable in the config file, just like the proxy?
>>>>        
>>>>
>>>It's quite easy to put this in the proxies file.  Does anyone feel it
>>>is an abuse of that file?  I'm not sure I'd want more than one file
>>>specifying paramaters on a per-host basis, so the proxies file seems
>>>the best one to me.
>>>      
>>>
>>Hmmm, but perhaps its time to rename the file?  (We can always look
>>for `proxies' too for backwards compatibility).
>>
>>Maybe `hosts' or `dav'?  Or just `network'?
>>    
>>
>
>I suppose we would need to rename some Windows resource key as
>well. I'm not really sure exactly how Windows resources work, but we
>have a
>
>#  define SVN_REGISTRY_CONFIG_PROXY_KEY "Proxies"
>
Ah, now I understand which Windows stuff! Well, you just rename that 
define, and there it is. Oh, and update the registry file on the 
Subversion downloads page that's a template for quick-fixing proxy 
configuration on Windows.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: [PATCH] Re: timeout on report

Posted by Philip Martin <ph...@codematters.co.uk>.
Karl Fogel <kf...@newton.ch.collab.net> writes:

> Philip Martin <ph...@codematters.co.uk> writes:
> > > I wonder if this
> > > should be configurable in the config file, just like the proxy?
> > 
> > It's quite easy to put this in the proxies file.  Does anyone feel it
> > is an abuse of that file?  I'm not sure I'd want more than one file
> > specifying paramaters on a per-host basis, so the proxies file seems
> > the best one to me.
> 
> Hmmm, but perhaps its time to rename the file?  (We can always look
> for `proxies' too for backwards compatibility).
> 
> Maybe `hosts' or `dav'?  Or just `network'?

I suppose we would need to rename some Windows resource key as
well. I'm not really sure exactly how Windows resources work, but we
have a

#  define SVN_REGISTRY_CONFIG_PROXY_KEY "Proxies"

-- 
Philip Martin

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

Re: [PATCH] Re: timeout on report

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Philip Martin <ph...@codematters.co.uk> writes:
> > I wonder if this
> > should be configurable in the config file, just like the proxy?
> 
> It's quite easy to put this in the proxies file.  Does anyone feel it
> is an abuse of that file?  I'm not sure I'd want more than one file
> specifying paramaters on a per-host basis, so the proxies file seems
> the best one to me.

Hmmm, but perhaps its time to rename the file?  (We can always look
for `proxies' too for backwards compatibility).

Maybe `hosts' or `dav'?  Or just `network'?

No problem with them being in the same file, but I'm worried people
will get that dazed-&-confused feeling if the file's meaning starts
drifting from its name...

-K

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

Re: [PATCH] Re: timeout on report

Posted by Philip Martin <ph...@codematters.co.uk>.
Matt Kraai <kr...@alumni.cmu.edu> writes:

> On Fri, Oct 25, 2002 at 01:27:18PM +0100, Philip Martin wrote:
> > Index: ../svn/subversion/libsvn_ra_dav/session.c
> > ===================================================================
> > +++ ../svn/subversion/libsvn_ra_dav/session.c	(working copy)
> > @@ -243,6 +244,10 @@
> >                       *proxy_username);
> >        svn_config_get(cfg, proxy_password, gb.proxy_group, "password",
> >                       *proxy_password);
> > +      svn_config_get(cfg, proxy_password, gb.proxy_group, "password",
> > +                     *proxy_password);
> 
> This is an extra copy, right?

It's extra, I'll remove it, thanks.

-- 
Philip Martin

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

Re: [PATCH] Re: timeout on report

Posted by Matt Kraai <kr...@alumni.cmu.edu>.
On Fri, Oct 25, 2002 at 01:27:18PM +0100, Philip Martin wrote:
> Index: ../svn/subversion/libsvn_ra_dav/session.c
> ===================================================================
> +++ ../svn/subversion/libsvn_ra_dav/session.c	(working copy)
> @@ -243,6 +244,10 @@
>                       *proxy_username);
>        svn_config_get(cfg, proxy_password, gb.proxy_group, "password",
>                       *proxy_password);
> +      svn_config_get(cfg, proxy_password, gb.proxy_group, "password",
> +                     *proxy_password);

This is an extra copy, right?

> +      svn_config_get(cfg, &timeout_str, gb.proxy_group, "timeout",
> +                     timeout_str);
>      }
>  
>    /* Special case: convert the port value, if any. */

Matt

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

[PATCH] Re: timeout on report

Posted by Philip Martin <ph...@codematters.co.uk>.
Philip Martin <ph...@codematters.co.uk> writes:

> I wonder if this
> should be configurable in the config file, just like the proxy?

It's quite easy to put this in the proxies file.  Does anyone feel it
is an abuse of that file?  I'm not sure I'd want more than one file
specifying paramaters on a per-host basis, so the proxies file seems
the best one to me.

Make neon session timeout configurable.

* subversion/libsvn_ra_dav/session.c
  (get_proxy_and_timeout): Renamed from get_proxy. Now gets timeout value
  as well.
  (svn_ra_dav__open): Set neon timeout.

* subversion/libsvn_subr/config_file.c (svn_config_ensure): Add timeout
  to initial config file text.

* subversion/include/svn_error_codes.h (SVN_ERR_RA_DAV_INVALID_TIMEOUT): New
  error.


Index: ../svn/subversion/include/svn_error_codes.h
===================================================================
--- ../svn/subversion/include/svn_error_codes.h	(revision 3495)
+++ ../svn/subversion/include/svn_error_codes.h	(working copy)
@@ -525,6 +525,10 @@
               SVN_ERR_RA_DAV_CATEGORY_START + 5,
               "RA layer file already exists")
 
+  SVN_ERRDEF (SVN_ERR_RA_DAV_INVALID_TIMEOUT,
+              SVN_ERR_RA_DAV_CATEGORY_START + 6,
+              "invalid timeout")
+
   /* ra_local errors */
   
   SVN_ERRDEF (SVN_ERR_RA_LOCAL_REPOS_NOT_FOUND,
Index: ../svn/subversion/libsvn_subr/config_file.c
===================================================================
--- ../svn/subversion/libsvn_subr/config_file.c	(revision 3495)
+++ ../svn/subversion/libsvn_subr/config_file.c	(working copy)
@@ -642,7 +642,8 @@
       apr_file_t *f;
       const char *contents =
         "### This file determines which proxy servers to use, if\n"
-        "### any, when contacting a remote repository.\n"
+        "### any, when contacting a remote repository and the duration\n"
+        "### of the timeout waiting for a response from the server.\n"
         "###\n"
         "### The commented-out examples below are intended only to\n"
         "### demonstrate how to use this file; any resemblance to\n"
@@ -663,6 +664,7 @@
         "# port = 80\n"
         "# username = blah\n"
         "# password = doubleblah\n"
+        "# timeout = 60\n"
         "\n"
         "### Information for the second group:\n"
         "# [othergroup]\n"
Index: ../svn/subversion/libsvn_ra_dav/session.c
===================================================================
--- ../svn/subversion/libsvn_ra_dav/session.c	(revision 3495)
+++ ../svn/subversion/libsvn_ra_dav/session.c	(working copy)
@@ -188,26 +188,25 @@
     return TRUE;
 }
 
-
-/* Set *PROXY_HOST, *PROXY_PORT, *PROXY_USERNAME, and *PROXY_PASSWORD
- * to the proxy information for REQUESTED_HOST, allocated in POOL, if
- * there is any applicable information.  If there is no applicable
- * information or if there is an error, then set *PROXY_PORT to
- * (unsigned int) -1 and the rest to NULL.  This function can return
- * an error, so before checking *PROXY_*, check for error return
- * value.
+/* Set *PROXY_HOST, *PROXY_PORT, *PROXY_USERNAME, *PROXY_PASSWORD and
+ * *TIMEOUT_SECONDS to the proxy information for REQUESTED_HOST, allocated
+ * in POOL, if there is any applicable information.  If there is no
+ * applicable information or if there is an error, then set *PROXY_PORT to
+ * (unsigned int) -1 and the rest to NULL.  This function can return an
+ * error, so before checking *PROXY_*, check for error return value.
  */
-static svn_error_t *get_proxy(const char **proxy_host,
-                              unsigned int *proxy_port,
-                              const char **proxy_username,
-                              const char **proxy_password,
-                              const char *requested_host,
-                              apr_pool_t *pool)
+static svn_error_t *get_proxy_and_timeout(const char **proxy_host,
+                                          unsigned int *proxy_port,
+                                          const char **proxy_username,
+                                          const char **proxy_password,
+                                          int *timeout_seconds,
+                                          const char *requested_host,
+                                          apr_pool_t *pool)
 {
   struct search_groups_baton gb;
   svn_config_t *cfg;
   const char *exceptions;
-  const char *port_str;
+  const char *port_str, *timeout_str;
 
   /* If we find nothing, default to nulls. */
   *proxy_host     = NULL;
@@ -215,6 +214,7 @@
   *proxy_username = NULL;
   *proxy_password = NULL;
   port_str        = NULL;
+  timeout_str     = NULL;
 
   SVN_ERR( svn_config_read_proxies(&cfg, pool) );
 
@@ -227,6 +227,7 @@
       svn_config_get(cfg, &port_str, "default", "port", NULL);
       svn_config_get(cfg, proxy_username, "default", "username", NULL);
       svn_config_get(cfg, proxy_password, "default", "password", NULL);
+      svn_config_get(cfg, &timeout_str, "default", "timeout", NULL);
     }
 
   /* Search for a proxy pattern specific to this host. */
@@ -243,6 +244,10 @@
                      *proxy_username);
       svn_config_get(cfg, proxy_password, gb.proxy_group, "password",
                      *proxy_password);
+      svn_config_get(cfg, proxy_password, gb.proxy_group, "password",
+                     *proxy_password);
+      svn_config_get(cfg, &timeout_str, gb.proxy_group, "timeout",
+                     timeout_str);
     }
 
   /* Special case: convert the port value, if any. */
@@ -266,6 +271,22 @@
   else
     *proxy_port = 80;
 
+  if (timeout_str)
+    {
+      char *endstr;
+      const long int timeout = strtol(timeout_str, &endstr, 10);
+
+      if (*endstr)
+        return svn_error_create(SVN_ERR_RA_DAV_INVALID_TIMEOUT, 0, NULL, pool,
+                                "illegal character in timeout value");
+      if (timeout < 0)
+        return svn_error_create(SVN_ERR_RA_DAV_INVALID_TIMEOUT, 0, NULL, pool,
+                                "negative timeout value");
+      *timeout_seconds = timeout;
+    }
+  else
+    *timeout_seconds = 0;
+
   return SVN_NO_ERROR;
 }
 
@@ -391,20 +412,22 @@
   sess = ne_session_create(uri.scheme, uri.host, uri.port);
   sess2 = ne_session_create(uri.scheme, uri.host, uri.port);
 
-  /* If there's a proxy for this URL, use it. */
+  /* If there's a timeout or proxy for this URL, use it. */
   {
     const char *proxy_host;
     unsigned int proxy_port;
     const char *proxy_username;
     const char *proxy_password;
+    int timeout;
     svn_error_t *err;
     
-    err = get_proxy(&proxy_host,
-                    &proxy_port,
-                    &proxy_username,
-                    &proxy_password,
-                    uri.host,
-                    pool);
+    err = get_proxy_and_timeout(&proxy_host,
+                                &proxy_port,
+                                &proxy_username,
+                                &proxy_password,
+                                &timeout,
+                                uri.host,
+                                pool);
     if (err)
       {
         ne_uri_free(&uri);
@@ -428,6 +451,12 @@
             ne_set_proxy_auth(sess, proxy_auth, pab);
             ne_set_proxy_auth(sess2, proxy_auth, pab);
           }
+      }
+
+    if (timeout)
+      {
+        ne_set_read_timeout(sess, timeout);
+        ne_set_read_timeout(sess2, timeout);
       }
   }
 

-- 
Philip Martin

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

Re: timeout on report

Posted by Philip Martin <ph...@codematters.co.uk>.
"Geoff O'Callaghan" <ge...@asri.org.au> writes:

> Hi,
> 
> I'm new to subversion so be gentle. :-)
> 
> I have a networked subversion repository on Linux.  I'm not sure how to
> accurately tell the version of SVN. It's checked out of the repos and the
> CHANGES file suggests that it's 0.14.3.

The command 'svn info working/copy/path' shows the revision of
working/copy/path amongst other things.  A working copy can be a mixed
revision working copy if you update, switch or commit parts of it, but
if you simply checkout and update the whole thing it will have a
uniform revision.

> 
> Anyway,  that's not the real problem .... on my remote system I try to do an
> update and get
> 
> svn update
> subversion/libsvn_ra_dav/util.c:332: (apr_err=175002, src_err=0)
> svn: RA layer request failed
> svn: REPORT request failed on /web-asri
> subversion/libsvn_ra_dav/util.c:81: (apr_err=175002, src_err=0)
> svn: REPORT of /web-asri: timed out waiting for server
> 
> Yes, it is a fairly large repository.  How can I change the appropriate
> timeout values in i'm guessing neon?

I suppose you could try modifying neon, but you could also use

Index: subversion/libsvn_ra_dav/session.c
===================================================================
--- subversion/libsvn_ra_dav/session.c  (revision 3495)
+++ subversion/libsvn_ra_dav/session.c  (working copy)
@@ -454,6 +454,9 @@
   ne_set_useragent(sess, "SVN/" SVN_VERSION);
   ne_set_useragent(sess2, "SVN/" SVN_VERSION);
 
+  ne_set_read_timeout(sess, 10);
+  ne_set_read_timeout(sess2, 10);
+
   /* clean up trailing slashes from the URL */
   len = strlen(uri.path);
   if (len > 1 && uri.path[len - 1] == '/')


which sets a 10 second timeout (adjust to suit).  I wonder if this
should be configurable in the config file, just like the proxy?

-- 
Philip Martin

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