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: [email protected]
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]