Skip to main content
Inspiring
March 27, 2008
Answered

Secure CFFTP Error

  • March 27, 2008
  • 3 replies
  • 1615 views
I am receiving the following error when trying to make a secure ftp connection using cfftp in ColdFusion 8

java.lang.OutOfMemoryError: Java heap space

I had 1 gb ram in the server with plans to upgrade anyway so it is now up to 3 gb with the max heap set to 1400mb (tried 1800, 1600, 1500 and CF wouldn't start, finally started at 1400) after getting the settings changed I ran the template and it appeared to create the connection (had another error later on in the file) but it only worked that one time.

Does anyone know why this is happening. If it is really a memory issue does anyone know how to get CF to start with the advertised max heap size of 1.8 gb?

Thanks
    This topic has been closed for replies.
    Correct answer jmurphy02
    I was getting the same error and after about a week of troubleshooting I found the problem to be with the JSch class that shipped with ColdFusion 8 which is version 0.1.28. I found looking through the change log for JSch that in version 0.1.29 they fixed a bug that related to having long banners, which our company has a very long warning banner. So, I stopped the ColdFusion/JRun services and renamed the existing jsch-0.1.28m.jar file to jsch-0.1.28m.jar.orig and put the latest available version which as of this posting was 0.1.37 into the same folder. Then I restarted JRun and ColdFusion and I was able to do a secure FTP without getting the java.lang.OutOfMemoryError message.

    I just installed ColdFusion 8.0.1 and the version of JSch is still 0.1.28, hopefully the next update will have a newer version. You can download the latest JSch library from http://www.jcraft.com/jsch/

    3 replies

    Participating Frequently
    March 28, 2008
    Monitoring is enabled only in enterprise edition of CF8. But alternatively you can try to use following tools.

    http://seefusion.com

    http://www.fusion-reactor.com
    MudockSRAuthor
    Inspiring
    March 31, 2008
    I am running the standard edition so I will check out those other tools.

    Thanks
    jmurphy02Correct answer
    Participant
    April 21, 2008
    I was getting the same error and after about a week of troubleshooting I found the problem to be with the JSch class that shipped with ColdFusion 8 which is version 0.1.28. I found looking through the change log for JSch that in version 0.1.29 they fixed a bug that related to having long banners, which our company has a very long warning banner. So, I stopped the ColdFusion/JRun services and renamed the existing jsch-0.1.28m.jar file to jsch-0.1.28m.jar.orig and put the latest available version which as of this posting was 0.1.37 into the same folder. Then I restarted JRun and ColdFusion and I was able to do a secure FTP without getting the java.lang.OutOfMemoryError message.

    I just installed ColdFusion 8.0.1 and the version of JSch is still 0.1.28, hopefully the next update will have a newer version. You can download the latest JSch library from http://www.jcraft.com/jsch/
    March 28, 2008
    You need to determine why you're running out of memory. CF8 has this new fangled monitor that will help you determine what is going on. Fire it up and figure out which segment of the heap you're filling up. You'll then need to adjust those values accordingly.
    Participating Frequently
    March 27, 2008
    We had same kind of problems and decided to use a 3rd party tool to manage SFTP tasks.

    We end up using WinSCP ( http://winscp.net) with scripting support and generating and running scripts on the fly via CF.

    I know this is not an answer for your question. Just an extra information. :)