Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for possible ftp connection pool starvation. #3

Closed
wants to merge 2 commits into from

Conversation

s4ibot
Copy link

@s4ibot s4ibot commented Jul 17, 2017

There is a possible connection pool starvation in methods FTPClientPool.get() and FTPClientPool.getOrCreate(). The isConnected() check should be fail-safe, otherwise there is a possibility that the Client will never return to the pool.

In my case it's also important to check the connection with a keepAlive() call. Because my ftp server can drop idle connections.

@s4ibot s4ibot closed this Jul 20, 2017
@robtimus
Copy link
Owner

Is this not needed anymore? Because I was planning on working on it this weekend.

@s4ibot
Copy link
Author

s4ibot commented Jul 21, 2017

The pool starvation is still there. But my commits don't fix the problem.

@robtimus
Copy link
Owner

robtimus commented Aug 6, 2017

I've just committed a change that should prevent pool starvation. Could you test if this works?

I'm also thinking about using Apache Commons Pool instead, but that would add more configuration features that need consideration.

@s4ibot
Copy link
Author

s4ibot commented Aug 8, 2017

Thanks!
I will take a look on the changes.
I thought about Apache Commons Pool too, but imo it would be an overkill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants