[
https://issues.apache.org/jira/browse/SVN-3694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15072709#comment-15072709
]
Roderich Schupp commented on SVN-3694:
--------------------------------------
This is not a bug, it's a user error.
For every run through the loop three additional file descriptors are opened:
one for the network connection to the Subversion server and one ieach for the
$out and $err files. Depending on the open file limit of the OS you may run out
eventually. Note that these file descriptors are NOT leaked, they will be
closed when the SVN pool associated with $ctx is cleaned up, i.e. when $ctx
goes out of scope. Hence, one solution would be to move the line
my $ctx = new SVN::Client(config => {});
into the loop, so that the clean-up happens at the end of the loop body.
Another would be to create a pool inside the loop and use it for the
$ctx->diff() call.
> When doing a diff via SWIG bindings, tempfiles are not cleaned up quickly
> enough
> --------------------------------------------------------------------------------
>
> Key: SVN-3694
> URL: https://issues.apache.org/jira/browse/SVN-3694
> Project: Subversion
> Issue Type: Bug
> Components: bindings_swig_perl
> Affects Versions: 1.6.x
> Reporter: Subversion Importer
> Priority: Critical
> Fix For: unscheduled
>
> Attachments: 1_bad-svn.pl
>
>
> {noformat:nopanel=true}
> I am using the Perl interface to subversion. My client version is 1.6.9.
> If I call SVN::Client's diff() over and over on a remote repository in a
> tight
> loop, it fails on the 255th request. Sometimes it fails with:
> RA layer request failed: OPTIONS of
> 'http://svn.apache.org/repos/asf/apr/apr/trunk': Could not resolve hostname
> `svn.apache.org': Host not found (http://svn.apache.org) at bad-svn.pl line 17
> And other times it fails with an error about "Can't find temporary directory".
> I can reproduce this against svn.apache.org and svn.mozilla.org both.
> Watching my /tmp directory, I see that the number of 'tempfile.#.tmp' files
> keeps growing and growing. I am guessing that upon reaching 255, svn somehow
> dies.
> I will attach a script that reproduces the problem reliably.
> {noformat}
> Original issue reported by *mkanat*
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)