You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Wadsworth, Eric (Contractor)" <wa...@fhu.disa.mil> on 2003/08/14 17:11:17 UTC

repository too slow suddenly

I restored a backup of my repository, and updated a few files here and
there, then checked out a working copy (which went file). Then I tried to
check out another working copy, and it got stuck partway through. A bunch of
CTRL-C signals finally got it to pay attention and abort the command. I
deleted the directory, and tried the checkout again. This time, it sat there
for a long time, then timed out waiting for the server.

I figured it was stuck, so on the server I ran "svnadmin recover /my/repos".
It says "Acquiring exclusive lock on repository db. Recovery is running,
please stand by...".

Well, I've been standing by for about an hour now. The whole repository is
only about 220 MB in size. I can still navigate through it via a web
browser, but each link I click on has a 10-second wait for something to
happen.

Any ideas what is going on? I'm understandably hesitant to just CTRL-C the
recover command. But I've got to get some work done, people are waiting for
this thing to be up and happy, and I don't want to give everyone the
green-light until I am sure it's happy.

--- Eric

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

Re: repository too slow suddenly

Posted by cm...@collab.net.
"Wadsworth, Eric (Contractor)" <wa...@fhu.disa.mil> writes:

> I figured it was stuck, so on the server I ran "svnadmin recover /my/repos".
> It says "Acquiring exclusive lock on repository db. Recovery is running,
> please stand by...".

I like to background this process and run 'lsof | grep log.0000'
during this.  Usually there are two logfiles opened at any given time,
the youngest one, and another one.  When these get close to being the
same file, you're almost done.

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

Re: repository too slow suddenly

Posted by Jani Averbach <ja...@cc.jyu.fi>.
On Thu, 14 Aug 2003, mark benedetto king wrote:

> Sorry to follow up to my own post, but here it is in apr:

=), If you are eager to take this one, go a head!

How do you have planned handle the situation when recovery
itself left behind a lock file? By manual intervention?

BR, Jani

-- 
Jani Averbach


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

Re: repository too slow suddenly

Posted by mark benedetto king <mb...@lowlatency.com>.
On Thu, Aug 14, 2003 at 01:52:14PM -0400, mark benedetto king wrote:

Sorry to follow up to my own post, but here it is in apr:

For normal opens:

   apr_file_t *file;

   status = apr_file_open(&file, lockfile, APR_READ | APR_WRITE,
                                          APR_OS_DEFAULT, pool);
   if (status) {
     error("could not open lockfile!");
   }

   /* note: we could remove the nonblock here and simply block until
      recovery is complete. */
   status = apr_file_lock(file, APR_FLOCK_SHARED |  APR_FLOCK_NONBLOCK);
   if (status) {
     error("repository is currently being recovered!");
   }


And for recover:

   status = apr_file_open(&file, lockfile, APR_READ | APR_WRITE,
                                          APR_OS_DEFAULT, pool);
   if (status) {
     error("could not open lockfile!");
   }

   status = apr_file_lock(file, APR_FLOCK_NONBLOCK);
   if (status) {
     error("repository is currently in use!");
   }


--ben


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

Re: repository too slow suddenly

Posted by mark benedetto king <mb...@lowlatency.com>.
On Thu, Aug 14, 2003 at 07:43:08PM +0200, Sander Striker wrote:
> WARNING: you can seriously corrupt your repository if you run recover
> and another process accesses the repository. 
> 

Should we implement a model where, for normal operation, we do

int rc, fd;
fd = open("/path/to/repo/format", O_RDONLY);
if (fd < 0) error("disaster!");
rc = flock(fd, LOCK_SH | LOCK_NB);
if (rc == EWOULDBLOCK) {
	error("repository being recovered right now!");
}
if (rc < 0) {
	error("disaster!");
}

and for recovery, we do

int rc, fd;
fd = open("/path/to/repo/format", O_RDONLY);
if (fd < 0) error("disaster!");
rc = flock(fd, LOCK_EX | LOCK_NB);
if (rc == EWOULDBLOCK) {
	error("repository still in use!");
}
if (rc < 0) {
	error("disaster!");
}


--ben


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

RE: repository too slow suddenly

Posted by Sander Striker <st...@apache.org>.
> From: Jani Averbach [mailto:jaa@cc.jyu.fi]
> Sent: Thursday, August 14, 2003 7:17 PM

> You have still apache up and running, ...
> 
> http://svnbook.red-bean.com/html-chunk/ch05s03.html#svn-ch-5-sect-3.3
> 
> Secondly, use the following recipe to attempt to unwedge your
> repository:
> 
>    1.
> 
>       Make sure that there are no processes accessing (or attempting to
> access) the repository. For networked repositories, this means shutting
> down the Apache HTTP Server, too.

WARNING: you can seriously corrupt your repository if you run recover
and another process accesses the repository. 

Please, please, be careful with recover people.  There isn't a warning in
the FAQ for nothing:

  http://subversion.tigris.org/project_faq.html#wedged-repos


Sander

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

RE: repository too slow suddenly

Posted by Sander Striker <st...@apache.org>.
<<< No Message Collected >>>

Re: repository too slow suddenly

Posted by Jani Averbach <ja...@cc.jyu.fi>.
On Thu, 14 Aug 2003, Wadsworth, Eric (Contractor) wrote:

> I figured it was stuck, so on the server I ran "svnadmin recover /my/repos".
> It says "Acquiring exclusive lock on repository db. Recovery is running,
> please stand by...".
>
> Well, I've been standing by for about an hour now. The whole repository is
> only about 220 MB in size. I can still navigate through it via a web
                             =========================================
> browser, but each link I click on has a 10-second wait for something to
> happen.

You have still apache up and running, ...

http://svnbook.red-bean.com/html-chunk/ch05s03.html#svn-ch-5-sect-3.3

Secondly, use the following recipe to attempt to unwedge your
repository:

   1.

      Make sure that there are no processes accessing (or attempting to
access) the repository. For networked repositories, this means shutting
down the Apache HTTP Server, too.

BR, Jani

-- 
Jani Averbach


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