How to increase a bean's heap size using -XMS

Excuse my ignorance. We developed a bean that opens a hi resolution (3,000 pixels by 3,000 pixels) JPEG from the hard drive and through JAI:
1. Zooms in
2. Crops
3. Streams the result to the browser
It works perfectly with small files but when we use the large JPEGs it gives an Out of Memory Exception
I have read extensively about how easy it should be to do the -XMS in the command line to increase the sandbox size to 256 MB or whatever.
But apparently the command requires the name of an application among its parameters. If we try to run it without such parameter it returns the online help.
Does anyone know what to enter in this parameter? Would it be our bean's name? Or certain class within JAI? How can we know which class is the one that runs out of memory?
Please help!!
:o)

I'll try that first thing tomorrow when I'm in my
workstation. Although I think we tried that. I'll let
you know of the outcome though.
My next question (in case what you say does not solve
our problem) will very very likely be utterly stupid.
I'll make it anyways.
Our bean resizes and crops the image through calls to
JAI. To follow your example, let's assume the bean is
called FooClass. Is it a fact the memory increase
should be applied to FooClass or can it be another JAR
or class outside of ours the one that is actually
running out of memory?
In our first rounds we didn't even have the code
inside a class but rather just a JSP. Since it was
running out of memory and we didn't know how to assign
memory to a JSP we decided to port it to a bean and
attempt to XMX the bean. Is there a way to solve out
of memory errors triggered by a JSP alone and not a
class?The -Xmx and -Xms switches applies to the whole JVM where the class is running. They can not be applied to a special class. Use the java -Xms etc for starting the application server/servlet container where your jsp runs and it will increase the amount of memory available.

Similar Messages

  • How to increase Memory and Java Heap Size for Content Server

    Hi,
    My content server is processing requests very slowly. Over performance is not good. I have 2 GB of RAM any idea what files I can modify to increase the Java Heap Size for the Content Server. If I increase the RAM to 4 or 6 GB where do I need to make changes for the Java Heap Size and what are the recommended values. I just have Content Server Running on the linux box. Or how do I assign more memory to the user that owns the content server install.
    Thanks

    You might find these interesting:
    http://blogs.oracle.com/fusionecm/2008/10/how_to_-javatuning.html
    http://download.oracle.com/docs/cd/E10316_01/cs/cs_doc_10/documentation/admin/performance_tuning_10en.pdf
    Do you have access to metalink? This has about everything you could want:
    https://metalink2.oracle.com/metalink/plsql/f?p=130:14:9940589543422282072::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,788210.1,1,1,1,helvetica
    Or search for "788210.1" in metalink knowledgebase if that link doesn't work and look for the FAQ on configuring Java for Content Servers

  • How to Increase the Rows and Columns Size of Bex Query in Enterprise Portal  of SAP  7.3

    Dear All,
    Please let me know the process how to Increase the Rows and Columns  Size of Bex Query in Enterprise Portal  of SAP  7.3 .
    Currently I am getting Only  4 columns and 10 rows in One Page .And I am getting 1,2 etc tabs for both row and column. So i want to increase the column length more than 100  and row length more than 10000.
    Please suggest me a suitable solution to over come this issue.
    Please find the Below screen shot.
    Thanks
    Regards,
    Sai

    Dear All,
    Please find the attached screen shot.
    The report be open with 4 or 5 columns and 5 or 6 rows.
    So, please  let me know how to increase the length of the table.
    Do the needful for me to over come this issue.
    Thanks
    Regards,
    Sai.

  • Problem increasing heap size using Java Control Panel

    I am running a web-based bioinformatics package which uses a Java applet as the client application. It mostly works fine, but some large clustering processes don't complete, they just cycle endlessly. The user manual advises increasing heap space "by entering the following command in the Java Control Panel or Java Plug-in dialog: -Xms128M -Xmx256M." I can open the Java Control Panel OK and enter the necessary command in the Java Runtime Parameters box, but after clicking OK then Apply, the Runtime Parameters box is empty again and there is no increase in the heap size allocation. In other words, the change doesn't take effect.
    I have already tried: adjusting one parameter at a time (max heap size first, then min); changing uppercase to lowercase M (-Xmx256m); restarting the browser after the change; rebooting my PC - none of these has helped.
    Technical details: it's Java 6 standard edition, build 1.6.0_10-rc-b28; browser is Internet Explorer 7; operating system is Vista (Service Pack 1); PC is a 2.4 GHz processor with 2 GB RAM (so I have plenty available to allocate to Java). I have local admin privilege on my PC.
    Help would be much appreciated, as I really need to complete these cluster analyses. I'm a biologist not a developer, so ideally I need a solution that doesn't involve major programming, though I'm OK with registry edits and use of the command line. Thanks in advance.

    The failure to retain the parameters is a bug, per hdong in this [Java,net thread|http://forums.java.net/jive/thread.jspa?threadID=44540&tstart=0] dated August 14
    "I did a little more research and found out that the problem is only with "-rc" or "-beta" versions of plugin. When 1.6.0_10 is finally released, the version string will be "1.6.0_10". Plugin works fine to set/get jvm parameters when version string is "1.6.0_10".
    I am surprised that this issue was not discovered earlier. It was probably because the internal test binary use "1.6.0_10" as version string.
    Yeah, it is a bug that will affect many manny developers. It will be fixed as soon as possible."

  • Upto how much I can set maximum Heap size for jvm?

    I am running application on 8GB RAM Windows 64 bits machine.
    I am running out of OutOfMemory (Heap Space). I want to increase the Heap Size for my jvm.
    But can anybody please tell me what is the limit by which I can set the maximum size for heap?
    Thanks in Advance,
    Jenish

    Max allowed memory per process is 2 raised to the 64th power. What maximum memory you can set depends on the memory available
    for your application. You may be able to set more than 8GB ram then it will use the swap space and it will slow down your application
    performance. So try different memory size and see which one works best for your application.

  • How can I know the allocated Heap size at runtime?

    I need to know (at runtime) the allocated Heap memory of my application.
    How can I do that ??????

    The Runtime methods freeMemory() and totalMemory() will give you the currently allocated heap size. The JVM can allocate more memory from the system as it needs it and these numbers will change.
    It doesn't look like you can get the actual maximum heap size the system can allocate. See
    http://developer.java.sun.com/developer/bugParade/bugs/4175139.html

  • How to monitor heap size used in OPP in order to protect Out of Memory

    My objective is to know how much heap size currently use so I can handle or do something before user got error report.
    The following sql statement just determine what the heap size per OPP process is currently setting:
    select DEVELOPER_PARAMETERS from FND_CP_SERVICES
    where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES
    where CONCURRENT_QUEUE_NAME = 'FNDCPOPP');
    Now OPP heap size is set to 1.5G.
    Thanks

    Hi Sam,
    Please review the following note, as it might help you!!!
    Tuning Output Post Processor (OPP) to Improve Performance (Doc ID 1399454.1)
    R12: How to Configure the Account Analysis Report for Large Reports (Doc ID 737311.1)
    Thanks &
    Best Regards,

  • Windows7-how to increase page width & reduce font size

    Compared to internet explorer, viewing each page on Firefox is difficult. Titles and images are overlapping and limited page width leaves blank columns on both sides, resulting in overlapping vertical text on the right side. Is there a way to 'Landscape' every page and also how do I reduce font size

    See
                                                                               how to increase the font size in outlook mail on iphone 4s and ios 6.0.1 operating system?                    

  • How to Serialize/Deserialize Beans with Web Services using DII client

    Dear All;
    I had developed a web serivce by Oracle JDeveloper [J2EE 1.4 (JAX-RPC)] and trying to invoke methods within through DII client using Apache Axis 1.
    The Beans I am using are structured as follows:
    public class InBean {
    public InBean() {
    private int x;
    private float y;
    public setters/getters for x
    public setters/getters for y
    public class OutBean {
    public OutBean() {
    private String inString;
    private String outString;
    public setters/getters for inString
    public setters/getters for outString
    The (InBean) is used as method input and the (OutBean) is used as method output.
    The problems I am facing are as follows:
    [1] How to serialize/desrialize the Beans as they are not registered with Apache Axis 1?
    [2] How to invoke the Beans using Dynamic client DII and not classic proxy and Stubs?
    [3] How to create the Beans using WSD2Java of the Apache Axis 1 ?
    In case you have any helping URL's, Book names or sample code, please attach as they will be very helpful.
    Thanks alot for the help.-----
    Best Regards,
    Ahmed M. Abbas

    You will find some working code at :
    http://ksoap.objectweb.org/software/downloads/index.html
    It's code that use kSOAP and kXML implementations ....
    If you will also find some useful information here :
    http://developers.sun.com/techtopics/mobility/apis/articles/wsa/
    http://www-106.ibm.com/developerworks/wireless/library/wi-jsr/
    http://www-106.ibm.com/developerworks/wireless/library/wi-xmlparse/
    Regards.

  • Why JVM shows another Heap size when Xms=Xsx?

    Hi everybody. I have two instances of oc4j on a cluster of two nodes. The configuration of parameters on opmn.xml is exactly the same for both instances.
    Particulary I see an strange behavior on memory heap. I expect that if Xmx and Xms parameters are equals to 4096, then the heap size must be fixed on 4 Gb exactly, and there will be not resizing.
    But monitoring the heaps with JVisualVM I can see that the heap size of the first instance is moving between 3.7 and 4 Gb, and the Heap size of the second node is moving around 3.2 Gb. The hosts have both 16 Gb of RAM, it's running on Windows 2003 Server R2 and there is no overload on the OS.
    Possibly the behavior is normal and I just have a wrong understanding of what is expectable.
    Here are some parameteres extracted from opmn.xml file:
    -D64
    -Dcom.sun.management.jmxremote
    -Xmx4096M
    -Xms4096M
    -XX:+UseParallelGC
    -verbose:gc
    -XX:+PrintGCTimeStamps
    -XX:+PrintGCDetails
    -Xloggc:D:\oracle\product\10.1.3\soa\j2ee\OC4J_SOA\archivo_loggc.log
    -Dcom.sun.management.jmxremote.port=8004
    -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=false
    -Djava.security.policy=D:\oracle\product\10.1.3\soa\j2ee\OC4J_SOA\config\java2.policy
    -Djava.awt.headless=true
    -Dhttp.webdir.enable=false
    -Doc4j.userThreads=true
    -Doracle.mdb.fastUndeploy=60
    -Doc4j.formauth.redirect=true
    -Djava.net.preferIPv4Stack=true
    -Dorabpel.home=D:\oracle\product\10.1.3\soa\bpel
    -Xbootclasspath/p:D:\oracle\product\10.1.3\soa\bpel\lib\orabpel-boot.jar
    -Dstdstream.filesize=8
    -Dstdstream.filenumber=30
    -Dhttp.proxySet=false
    -XX:MaxPermSize=768M
    -XX:PermSize=768M
    -Doraesb.home=D:\oracle\product\10.1.3\soa\integration\esb
    -Dorabpel.process.lock.timeout=300
    -Drmi.client.connection.timeout=100
    -Doracle.dms.hunter.sleeptime=600000
    -Doracle.dms.gatherers=300000,2:1800000:3
    -Djavax.net.ssl.keyStore=D:\oracle\product\10.1.3\soa\jdk\jre\lib\security\cacerts
    -Djavax.net.ssl.keyStorePassword=changeit
    -DopmnPingInterval=90
    -Xrs
    -DHTTPClient.socket.staleCheck=true
    -DHTTPClient.disableKeepAlives=true
    -XX:+HeapDumpOnOutOfMemoryError

    Hi Sebastien, Thanks for responding.
    In fact I'm looking exactly where you say to determine your heap size.
    The thing is that I can't understand why one instance takes some minor heap size and fluctuates the size while the other instance take around 4 Gb and kept static in this value. I can see there is no diferences on configuration for both. I know that the used heap must present diferent behavior, but not the total size. I think that the size should be fixed and static with Xmx=Xms=4096, but this is not happening.
    I would like to show an image to ilustrate what I'm describing.
    About the PermGen, I think there's no problem with that, around 80% is in effective use, and this value is stable.
    Best regards

  • How to Increase the Parameter filter box size

    Hi Experts,
    I want to increase the size of the report parameter filter box. is it possible to increase the size based on the value.
    Any help is appreciated.
    Thanks in Advance,
    Rajan

    Hello Rajan,
    It's not possible to modify the parameter boxes / area.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to increase toolbar icon and text size on new pc

    I just purchased a new laptop and with the new screen resolution, the icons and text on the toolbars, menu and address bar are small.
    I was wondering it there was a way to increase the size of all these things?
    I tried changing the screen resolution on the laptop but any setting other than the native display setting causes everything to be fuzzy
    Any help is greatly appreciated
    == This happened ==
    Every time Firefox opened
    == I installed firefox on new laptop

    Hello Tony.
    I see that you are using Windows 7. Windows 7 (and other versions of Windows) have accessibility tools that will let you change the scale of the image. This will have an effect on all applications, not just Firefox. Contact Microsoft for help on that.
    In any case, you may have luck if you search for a specially made theme: [http://addons.mozilla.org/ addons.mozilla.org]. I doubt it will look pretty though.

  • How to insert a bean variable into MySql using jsp

    Hi, I have a problem that I have been trying to work out for ages..unsuccessfully.
    My web-site takes 2 inputs off a user...does a calculation on them and returns the result to the user.
    I want to then use another jsp page that will take this result and insert it into a database...
    My class code for this is :
    public void updateRepmax(String userName, String repmax) throws SQLException, Exception{
         if(con != null){
         try{
         PreparedStatement update;
         update = con.prepareStatement("UPDATE repmax SET Benchpress = ?, WHERE Member_Name = ?");
         update.setString(1, repmax);
         update.setString(2, userName);
         update.execute();
         } catch(SQLException sqle){
         error = "SQLException: could not update repmax";
         throw new SQLException(error);
         catch(Exception e){
         error = "An exception occured while updating repmax";
         throw new Exception(error);
         } else {
         error = "Exception: connection to database was lost";
         throw new Exception(error);
    My JSP is :
    <%@page import="java.sql.*, placement.*"%>
    <jsp:useBean id="conn" class="placement.DBConnect" />
    <jsp:useBean id="query" class="placement.DBQuery" />
    <jsp:useBean id="bpcalc" class="placement.repmaxBean" />
    <jsp:useBean id="userin" class="placement.User" />
    <html>
    <head><title>Update Repmax</title></head>
    <body>
    <%
    conn.connect();
         String repmax = bpcalc.getRepmax();
         String userName = userin.getUserName();
    query.setCon(conn.getCon());
         query.updateRepmax();
    conn.disconnect();
    %>
         </body>
         </html>
    The variable I am tryin to insert is repmax ,in the class that does the calculation the repmax is a double so I assume that is my first problem(how can this be changed to allow it to insert?)....any help you have to offer would be greatly appreciated... 

    Thanks for your reply sathishkb,
    I am not actually receiving any error message,
    The jsp page is processed and the code seems to be correct however the table in my mysql database is not updated.. my JDBC drivers are working correctly etc.
    I expect that the problem is in my JSP page but dont know what it is
    I have removed that comma in my update statement
    I no longer have the problem of the variable being of type touble as I altered my other code to convert the variable from double to string
    jsp is now:
    <%@page contentType="text/html"%>
    <%@page import="java.sql.*, placement.*"%>
    <jsp:useBean id="conn" class="placement.DBConnect" />
    <jsp:useBean id="update" class="placement.DBQuery" />
    <jsp:useBean id="bpcalc" class="placement.repmaxBean" />
    <jsp:useBean id="currentuser" class="placement.currentuserBean" />
    <html>
    <head><title>Insert Into Repmax</title></head>
    <body>
    <%
    String repmax = bpcalc.repmax;
    String userName =currentuser.name;
    conn.connect();
         update.setCon(conn.getCon());
         update.updateRepmax(repmax,Username);
    conn.disconnect();
    %>
         </body>
         </html>
    the segment of my bean code is :
    public void updateRepmax(String repmax,String userName) throws SQLException, Exception{
         if(con != null){
         try{
         PreparedStatement update;
         update = con.prepareStatement("UPDATE repmax set Benchpress = ? WHERE Member_Name= ?");
         update.setString(1,repmax);
         update.setString(2,userName);
         update.execute();
         } catch(SQLException sqle){
         error = "SQLException: could not update employer";
         throw new SQLException(error);
         catch(Exception e){
         error = "An exception occured while updating employer";
         throw new Exception(error);
         } else {
         error = "Exception: connection to database was lost";
         throw new Exception(error);
    }

  • How to increase -Xmx for my ImageJ program using JRockit

    Hey guys,
    I'm a complete newbie. I need to increase the memory space to as great as possible for my program ImageJ. I have 3gigs of ram on my dual-quad-core computer. I understand that the max memory I can allocate to the jvm is 2.25gigs (75%?)
    Where do I enter in the line -Xmx2250m to increase my memory?
    I installed BEA JRockit 5.0 JRE R27.5
    Thanks!

    Are you running on Windows? If so, you have probably run into the process address space limitation. See:
    http://dev2dev.bea.com/blog/hstahl/archive/2005/12/how_to_get_almo.html
    Or JRockit docs on e-docs.bea.com for more info.
    -- Henrik

  • Retrieve Heap size from program

    Hi, i searched the foruns with "get heap size" and "retrieve size"
    and i also checked the System.getProperty(String key) string keys at
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#getProperty(java.lang.String)
    and havent found a method to retrieve the currently set heap size.
    Is there a way to do this?
    My program needs to initialize something based on how large the
    user set the heap size (using the command line -Xms32m -Xmx128m...)
    Any info would be appreciated! Thanks alot!

    Touche!
    Thanks alot you pointed me in exactly the right direction.
    When i did research on java.lang.Runtime
    i found this post
    http://forums.java.sun.com/thread.jspa?threadID=529065&start=0&tstart=165
    which is a great two page thread on this subject.
    Runtime
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#maxMemory()

Maybe you are looking for

  • SAP Italy

    Dear All, This is a slightly largish post, so bear with me. We are implementing SAP at our Italy entity. We have some questions and clarifications on the accounting set up in SAP for Italy. We have largely identified what needs to be done on the cust

  • Radio buttons (from Indesign) get larger and overlap when fields are highlighted in Acrobat X

    I have created my first set of interactive forms using Indesign CS6 Buttons and Forms dialog box. As the formatting of the fields does not seem to carry over, I have left the text boxes as Indesign objects and added text fields over the top of them i

  • Links in other applications opening in new windows now instead of tabs randomly

    Randomly today after booting up my PC and opening firefox links I receive from other people on like AIM or Steam chat open a whole new window where as before they would just open a new tab. It's veryyyy annoying and I have the option "Open new window

  • Paying Foreign Currency Invoice with Functional Currency

    Hi, Can anyone advise if I am able to pay a foreign currency invoice using functional currency in AP? Eg. if my functional currency is USD and invoice is in GBP, how can I pay in USD against the GBP invoice? Thank you and God bless you.

  • How can we create Query by using SQVI

    Hi Frendz, I need to generate a report by using SQVI hw can i do that, i want each step wise( I dont know how to do that even begining also), Pl send reply ASAP. Thanks Babu Rao