axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Commented: (AXIS-1567) Client out of memory exception calling webservice with a return string > 1MB
Date Fri, 24 Sep 2004 12:12:32 GMT
The following comment has been added to this issue:

     Author: Venkat Reddy
    Created: Fri, 24 Sep 2004 5:11 AM
hi Guenther,

I'm able to reproduce the OutOfMemoryError with varying VM memroy setting and string sizes.

VM(-Xmx)       String size
64M             7M
128M           14M
256M           28M

So, the memory consumption goes up by 9MB for evey 1MB of string size. No idea why this happens.
But the good news is that this allocation is getting cleaned by GC when it runs next, so may
not be called as memory leak.

The following HProf output shows me the StringBuffer as the likely consumer of the memory.

java.hprof.txt: Objects Created by Method
     23696 java.lang.StringBuffer.expandCapacity
     16063 java.lang.StringBuffer.toString
     16059 java.lang.StringBuffer.<init>
      9751 java.lang.Throwable.fillInStackTrace
      7318 java.lang.String.replace
      5691 sun.misc.URLClassPath$FileLoader.getResource
      5214 java.lang.String.substring
      5083 <unknown caller>
      4613 java.lang.ClassLoader.defineClass0
      3502 java.lang.String.concat

Any other thoughts from anyone?
View this comment:

View the issue:

Here is an overview of the issue:
        Key: AXIS-1567
    Summary: Client out of memory exception calling webservice with a return string > 1MB
       Type: Bug

     Status: Unassigned
   Priority: Critical

    Project: Axis
             Basic Architecture

   Reporter: Guenther Zwetti

    Created: Wed, 22 Sep 2004 3:55 AM
    Updated: Fri, 24 Sep 2004 5:11 AM
Environment: winxp

I have implemented a very simple webservice which produces
a String return value holding a special XML structure.
The length of this string is about 900kB. When I return this string
the client throws an out of memory exception.
The stubs for the client have been created with wsdl2java.
Are there any size limitations?


	public String loadPersons(int year) {
          // produces a string with size > 1MB
          return myString


	ServiceXLocator location = new ServiceXLocator();
	try {
	   ServiceX service = location.getServiceX(new URL(LOC));	String x = service.loadInventors(2003);

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message