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

Large number of files to 'put' blows JVM heap #228

Open
markjfisher opened this issue Mar 31, 2017 · 1 comment
Open

Large number of files to 'put' blows JVM heap #228

markjfisher opened this issue Mar 31, 2017 · 1 comment

Comments

@markjfisher
Copy link

Environment info

groovy-ssh-2.8.0 (java-1.8.0_111, groovy-2.4.7, jsch-0.1.54)

Steps to reproduce

  1. 'put' a directory with large number of files and directories

I'm using put to copy a directory of exploded EARs to target destinations.

The directory I'm trying to push has 58k files (largest directory depth 19). When trying to send, the code that creates the instructions to execute through the connection eventually kills the JVM process with heap errors.

My work-around is to compress the directory into a single file, push that, then decompress on the target, but this is adding overhead (even with 'store' of zip it's adding ~60 seconds to the process).

@amake
Copy link
Contributor

amake commented Apr 20, 2017

In theory, the "real" problem is that the files to be PUT are gathered eagerly first, and then processed; a true fix would process the files without gathering them all into memory first.

However I wonder if the effective problem isn't that child directories are double-traversed (see #230). With a large number of heavily nested directories, the total number of files gathered would explode. When 2.9.0 is released I suspect this issue may be resolved.

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

No branches or pull requests

2 participants