On Sun, Dec 16, 2012 at 12:30 AM, Afkham Azeez <[email protected]> wrote:

>
>
> On Sat, Dec 15, 2012 at 6:40 PM, Muhammed Shariq <[email protected]> wrote:
>
>> On Sat, Dec 15, 2012 at 6:31 PM, Afkham Azeez <[email protected]> wrote:
>>
>>>
>>>
>>> On Sat, Dec 15, 2012 at 4:40 PM, Anjana Fernando <[email protected]>wrote:
>>>
>>>> Hi,
>>>>
>>>> I was doing a load test on DSS, and noticed that there is a constant
>>>> memory growth in it, and it keeps growing with the request count. And when
>>>> stopped, after some time, a considerable amount of memory is being freed at
>>>> once. I profiled the code and checked by running echo service (just to make
>>>> sure it is not a data services issue), and saw that, an HTTP session is
>>>> created for each of the calls coming into the Carbon server. Basically this
>>>> is happening in the "CarbonContextCreatorValve" (v4.0.5),
>>>> "initCarbonContext" method, line 80. Basically it does a
>>>> request.getSession(), where it will create an HTTP session, if there isn't
>>>> one already there.
>>>
>>>
>>> Most probably this is a new bug introduced by Shariq's recent fix to set
>>> the username in the CarbonContext. Code should not unnecessarily call
>>> request.getSession()
>>>
>>
>> Yes I added this call to get set the username to CC as we found that the
>> username was not getting set .. I'll change it to getSession(false) and
>> handle the null situation ..
>>
>>
> If you profile, you may be able to see a drop in performance due to the
> unnecessary call to getSession(false) for each and every request. Most
> things related to populating the CarbonContext have to be deferred to the
> last moment until they are really needed, like the case of the
> GhostRegistry.
>

+1 .. this has been reverted .. sorry about the troubles caused ..!!



-- 
Thanks,
Shariq.
Phone: +94 777 202 225
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to