Sending large amounts of data to a .NET webservice - Java Heap Space error

StarLite

New Member
Hi there,

I am currently building an OpenEdge 10.1B webservice and a .NET client to connect to it.
I got it all running fine and nice, except when I request too many records at the same time. When I try to pass over about 1100 records I get a "Java heap space" SOAP error.

Basicly my code does the following:
Code:
DEFINE TEMP-TABLE tt LIKE SHD.
DEFINE OUTPUT PARAMETER table for tt.

FOR EACH SHD:
   CREATE tt.
   BUFFER-COPY SHD TO tt.
END.

* Is this the "correct"/preferred way to request a table's contents?
* How do I increase the java heap space? I tried adding [SIZE=-1]jvmargs=-server –Xms200m –Xmx200m [/SIZE][SIZE=-1]to the [UBroker.AS.asbroker1] directive in my ubroker.properties file, but if I do that [/SIZE]my broker refuses to start.
 
I managed to 'fix' the Java heap space problem, by setting the maximum java heap space to 1024MB via the registry: (somehow I didn;t find the answer in the KB the last time :x)
When using the Tomcat 5.5 Windows service, you need to add/change the following DWORD decimal values of the HKLM\Software\Apache Software Foundation\Procrun 2.0\tomcat5\Parameters\Java registry key, for example:
JvmMs = 8
JvmMx = 1024
You can also use the "Configure Tomcat" shortcut and specify the amount of memory in the Java tab for the "Initial memory pool" and "Maximum memory pool".

The problem is I am STILL running out of heap space (altho be it after a longer time).
The problem is that the amount of data to be sent over is huge, when outputting it to a CSV file the file is close to 20MB. Calculating (based on a testset of approx 2000 records) that to an SOAP XML file that would equal a file close to 300 MB.
I guess the Appserver is very inefficient when handling this amount of data.

1 possible way to solve this would be to have a maximum of 1000 records sent at a time, but that would require me to create a framework in .NET to fetch, cache, and stick together the data. I would rather solve this on the webservice/progress side then to have the client do all the hard work.
 
Back
Top