• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: java.lang.OutOfMemoryError during downloads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java.lang.OutOfMemoryError during downloads


  • Subject: Re: java.lang.OutOfMemoryError during downloads
  • From: Elizabeth Lynch <email@hidden>
  • Date: Fri, 28 Nov 2003 10:01:15 +0000

Kranthi

You can increase the amount of memory available to the Java VM by adding the app startup parameter:

	-XmxNNNm
eg

	-Xmx256m

to increase the JVM memory to 256MB (The default is 64MB).

We have to do this for sites where we are uploading and downloading large image files.

Doing this will almost certainly solve your immediate out-of-memory problem, although there may be code tweaks you can add as well.

Liz
---
Liz Lynch		www.plsys.co.uk
P&L
UK


On Friday, November 28, 2003, at 05:16 am, Kranthi Sagar Borra wrote:

Hi
if i am not wrong the streamlioning functionality in webobjects is to overcome the problem of uploading and downloading huge files right.Please correct me if I am worng.But now I am uploading a file (<filename>.tar.gz) of size 17.2 MB.The upload is happening prperly.But now if i downlod the file from the application server to the users desktop ,I am getting the following error
.
2003-11-22 11:19:59 IST] <WorkerThread0> <WOWorkerThread id=0 socket=null> Throwable occurred: java.lang.OutOfMemoryError
[2003-11-22 11:19:59 IST] <WorkerThread0> java.lang.OutOfMemoryError
<<no stack trace available>>


[2003-11-22 11:19:59 IST] <WorkerThread0> <WOWorkerThread id=10000 socket=null> Workerthread exiting due to error, respawning with ID 10000...
com.webobjects.foundation.NSForwardException for java.lang.OutOfMemoryError
<<no stack trace available>>


.I am not very sure of what this error is.But I think this error has occured because of low memory.But this should not happen because of streamlining functionality.Can you please tell me why this has occured.While downloading the file, i am actually sending it from the application server by appending it to the response object.Below is the code for the same.Please tell me if I am going wrong somewhere.

public void appendToResponse(WOResponse aResponse, WOContext aContext) {



aResponse.setHeader("application/octet-stream","content-type");


aResponse.setHeader("attachment;filename=\"" +
downloadFileName + "\"", "content-disposition");
try{
aResponse.appendContentData(data.dataWithContentsOfFile(filePath));


            }catch(IOException ex){
                ex.printStackTrace();
          }
            aResponse.setContent(data);
            isdownloaded=false;

   }



Regards,

Kranthi Sagar
Extn:6799
Direct:0824-2226799
Cell:9845791246
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Incompatibilities between WebObjects 5.2 and Mac OS X 10.3
  • Next by Date: OT: next release of WO?
  • Previous by thread: Re: java.lang.OutOfMemoryError during downloads
  • Next by thread: Re: java.lang.OutOfMemoryError during downloads
  • Index(es):
    • Date
    • Thread