> #!/usr/bin/perl
>
> use FindBin qw($Bin);
> use lib ("$Bin/lib","$Bin/cpan-lib");
>
> use Net::CouchDB;
>
> my $host=shift;
> my $secs=shift;
>
> my $couch=Net::CouchDB->new($host);
>
> my @docs=map{ { '_id' => $_, 'lang' => 'erlang' } } (1...500);
>
> foreach (1...200) {
> my $dbh=$couch->create_db("event-$_");
> print "Created database $_\n";
> $dbh->insert(@docs);
> sleep($secs);
> }
IANAPM, but if $dbh is holding an open connection you could very well
trigger this quite easily. Can you try replacing the sleep($secs) with
something like $dbh->close()? Any easy way to check this is to watch
`netstat -tap tcp` and see if the number of sockets on either machine
is growing monotonically.
HTH,
Paul Davis