if you transferring heavy data oevr the wire, consider using mtom.
On 31/01/2008, Philipp Leitner <[EMAIL PROTECTED]> wrote: > > Still not sure whether you expirience the exception on client or server > side. > > However: 300.000 longs do seem like a lot of elements to transport at > once. I would not be surprised if such a huge array simply leads to > memory problems during wrapping/unwrapping. > > Best solution (if that is indeed the problem) would be to split the one > huge invocation into a number of smaller ones (or increasing the heap > size to avoid memory problems, but that's probably just a temporary fix). > > 100% CPU does not seem very uncommon to me - I have seen similar > behavior during wrapping/unwrapping of big SOAP messages. XML processing > is expensive in terms of CPU cycles. > > /philipp > > > Raghu Upadhyayula schrieb: > > Hi Phillip, > > > > I think there were around 300,000 elements in the long[] when I ran > > into this issue. > > > > I suppose, the exception happens in the app logic, I haven't tried > > it on my local machine yet (the error happened on one of our QA > > servers). > > > > In the application logic, what I do is, execute a query, loop > > through the result set, store the results in a List<Long> as I don't > > know how many rows are in the result set, and then loop through the > > List<Long> and store then in the long[] and return the long[] back to > > the client. > > > > Thanks > > Raghu > > -----Original Message----- > > From: Philipp Leitner [mailto:[EMAIL PROTECTED] > > Sent: Thursday, January 31, 2008 5:05 AM > > To: axis-user@ws.apache.org > > Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage > > (OutOfMemoryError) on API call > > > > How many elements are there in your long[] when you run out of memory? > > When exactly does the exception happen (in your app logic, during > > wrapping, during transmission, on client side?). > > > > /philipp > > > > Raghu Upadhyayula schrieb: > >> Hi, > >> > >> > >> > >> I have a webservice API call which is using 100% of Memory & CPU and > >> throwing an OutOfMemoryError (I'm using Axis2 1.3). > >> > >> > >> > >> My webservice call returns a long array. > >> > >> > >> > >> Here is the signature of my webservice API. > >> > >> > >> > >> *public long[] getIds(Calendar startDate, Calendar endDate) throws > >> Exception; * > >> > >> > >> > >> Based on the given startDate & endDate, I retrieve the corresponding > >> records from the database and store the ids in a long array and return > > > >> the long array to the client. > >> > >> > >> > >> If the number of records is more, I'm having the issue of 100% memory > > / > >> CPU usage or OutOfMemoryError. > >> > >> > >> > >> Does anyone of you have any ideas on how to overcome this issue? > >> > >> > >> > >> Thanks > >> > >> Raghu > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >