On Tue, 31 Oct 2006, Garrett Rooney wrote:
> On 10/29/06, Brandon Chubb <bfc0713@verizon.net> wrote:
> > Using SVN 1.1.4 with some simple calls using the Perl bindings, I eventually
> > run out of descriptors. I can see with lsof that a large number of TCP
> > connections stay open.
> >
> > Has anyone run into this before? I'm not going to doubt that I'm doing
> > something wrong, but having gone through the SVN::Client and SVN::Core
> > manuals, I certainly don't see anything promising to fix things. If I use a
> > tiny test program and the debugger, I can see the TCP connection count
> > increase with almost every SVN call.
>
> Well, if you don't include an example of what your code is doing, it's
> rather difficult to speculate about what might be wrong with it.
Fair enough. It's just that the code to reproduce the problem is so
simple, it seems that someone else may have hit it. My real code
to load up subversion is a little more involved of course. But it
still sets up no callbacks for logging, going through checkin results, etc.
The code below will show one connection after the checkout, and 2
after the checkin. Anything talking to the repository will add another
connection (until I'm out of descriptors).
---------
#!/usr/bin/perl
use SVN::Core;
use SVN::Client;
*WORKDIR = \"/some/work/dir";
*REPO = \"svn://somehost/somerepo";
# callback for authentication
sub simple_prompt {
my ($cred,$realm,$default_username,$may_save,$pool) = @_;
$cred->username('username');
$cred->password('password');
}
$mypid = $$;
my $ctx = new SVN::Client(auth =>
[SVN::Client::get_simple_provider(),
SVN::Client::get_simple_prompt_provider(\&simple_prompt,2),
SVN::Client::get_username_provider()]);
chdir($WORKDIR);
$ctx->checkout($REPO, $WORKDIR, "HEAD", 1);
print "Done with checkout, connections:\n";
system("lsof -p $mypid | grep TCP");
`echo blah > test.txt`;
$ctx->add("test.txt",0);
$ctx->commit("test.txt", 0);
print "Done with commit, connections:\n";
system("lsof -p $mypid | grep TCP");
print "Done.\n";
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Oct 31 23:27:04 2006