Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Interest »

Re: OutOfMemory on weblogic server

Kevin Gaasch

2005-01-06

Replies:

I would agree with David on this one. A client request should return in
a timely manner. Hence, you would want that kind of processing done on
a separate thread.

One other suggestion I have is to set you minimum heap (ms) equal to
your maximum heap. That way the server doesn't have to burn CPU cycles
trying to allocate memory.

You should also consider refactoring the way you're building the file.
I would bet that your memory problems are not caused by the size of the
file, but how you're creating it. For example, if you build the entire
file as a string in memory, that would eat a significantly larger amount
of memory than writing the file to the stream in chunks. Remember that
if you're running in a multi-user environment, there will be other
clients trying to use the system. You don't want to "nail the server to
the wall" for just one process.

As for your timeout problem, you can adjust the timeout length in the
JTA settings on the weblogic console.

Kevin E. Gaasch
Panhandle Plains Student Loan Center
Software Craftsman
Senior Programmer/Analyst
Sun Certified Java Programmer
Work: 806.324.4108
Cell:   806.674.1523

>>> david.karr@(protected) >>>
Are those the exact arguments you're sending on the command line? I'm
not sure what that would do, as you're specifying "-mx" twice. You
probably meant the first one to be "-ms". In any case, I imagine that
would still set "-mx" to 1024, but that's just a guess.

Are you monitoring how long it really takes to write the data to the
file? Is it really taking on the order of >240 seconds? If so, then
you should probably do that on a separate thread, asynchronously from
the original client request.

    -----Original Message-----
    From: A mailing list for Java(tm) 2 Platform, Enterprise
Edition
[mailto:J2EE-INTEREST@(protected)
    Sent: Thursday, January 06, 2005 1:41 AM
    To: J2EE-INTEREST@(protected)
    Subject: OutOfMemory on weblogic server


    Hi,

    We are running weblogic 7.0 on linux redhat 7.3.
    I am getting outOfmemory on the server side whenever we are
trying to export large amout of data to a csv file.
    I tried increasing the heap size by specifying java options
"-server -mx512m -mx1024m"
    but now i am not getting the OutOfmemory but a error on the
client side saying
    "No response for "240" seconds"
    where 240 is the transaction-timeout .
    after this i cannot do anything with the server,
    i have to restart the server :(
    Can any one please help me solve this problem.

    Regards
    Sanjeev




    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around

    http://mail.yahoo.com
========================================================================
=== To unsubscribe, send email to listserv@(protected)
the body of the message "signoff J2EE-INTEREST". For general help,
send
email to listserv@(protected)
"help".




===========================================================================
To unsubscribe, send email to listserv@(protected)
body
of the message "signoff J2EE-INTEREST". For general help, send email
to
listserv@(protected)".


CONFIDENTIALITY NOTICE
The information contained in this message and/ or its attachments may be privileged and confidential, and is intended only for the use of the individual(s) named above. If you are not the intended recipient, you are notified that any dissemination, distribution, or copying of this communication is strictly prohibited and are requested to delete the message and/or its attachments. If you have received this communication in error please notify us immediately by telephone at (806) 324-4100.
Panhandle-Plains Student Loan Center (PPSLC), has taken reasonable precautions to ensure that any attachment to this e-mail has been scanned for viruses. We specifically disclaim all liability and will accept no responsibility for any damage sustained as a result of software viruses. We advise you to carry out your own virus checks before opening any attachment.

===========================================================================
To unsubscribe, send email to listserv@(protected)
of the message "signoff J2EE-INTEREST". For general help, send email to
listserv@(protected)".
©2008 junlu.com - Jax Systems, LLC, U.S.A.