server hang because of memory usage estimate not accurate?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

server hang because of memory usage estimate not accurate?

Li Li
I am using the default configuration(maximum 4G heap) and <memoryUsage
percentOfJvmHeap="70" />
I send many small size TextMessages to server and it hangs

I use jmap -heap and found that the free memory is less than 100MB and
the server can do nothing but do gc. but gc can't free anything.
client can't even connect to server.
I use ./bin/activemq stop and it fails to stop server.
I have to kill -o pid

I guess the reason is that: activemq estimate memory by string size.
but for small trings, the heap are all small fragmentations.

I modify percentOfJvmHeap to 50 and it works better but after long
time, it still occurs.
Reply | Threaded
Open this post in threaded view
|

Re: server hang because of memory usage estimate not accurate?

Li Li
sorry max heap is 1G, not 4G

On Fri, Mar 28, 2014 at 3:23 PM, Li Li <[hidden email]> wrote:

> I am using the default configuration(maximum 4G heap) and <memoryUsage
> percentOfJvmHeap="70" />
> I send many small size TextMessages to server and it hangs
>
> I use jmap -heap and found that the free memory is less than 100MB and
> the server can do nothing but do gc. but gc can't free anything.
> client can't even connect to server.
> I use ./bin/activemq stop and it fails to stop server.
> I have to kill -o pid
>
> I guess the reason is that: activemq estimate memory by string size.
> but for small trings, the heap are all small fragmentations.
>
> I modify percentOfJvmHeap to 50 and it works better but after long
> time, it still occurs.
Reply | Threaded
Open this post in threaded view
|

Re: server hang because of memory usage estimate not accurate?

ceposta
In reply to this post by Li Li
can you show stack traces next time it happens so we can see what the
broker was trying to do when it "hanged"? And what constituted
hanging? Couldn't send more messages, couldn't receive messages?

On Fri, Mar 28, 2014 at 12:23 AM, Li Li <[hidden email]> wrote:

> I am using the default configuration(maximum 4G heap) and <memoryUsage
> percentOfJvmHeap="70" />
> I send many small size TextMessages to server and it hangs
>
> I use jmap -heap and found that the free memory is less than 100MB and
> the server can do nothing but do gc. but gc can't free anything.
> client can't even connect to server.
> I use ./bin/activemq stop and it fails to stop server.
> I have to kill -o pid
>
> I guess the reason is that: activemq estimate memory by string size.
> but for small trings, the heap are all small fragmentations.
>
> I modify percentOfJvmHeap to 50 and it works better but after long
> time, it still occurs.



--
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta
Reply | Threaded
Open this post in threaded view
|

Re: server hang because of memory usage estimate not accurate?

Li Li
the server is doing nothing but gc. no client can connect to it. even
the hawtio.
next time I will save the jstack and jmap result

On Tue, Apr 1, 2014 at 5:53 AM, Christian Posta
<[hidden email]> wrote:

> can you show stack traces next time it happens so we can see what the
> broker was trying to do when it "hanged"? And what constituted
> hanging? Couldn't send more messages, couldn't receive messages?
>
> On Fri, Mar 28, 2014 at 12:23 AM, Li Li <[hidden email]> wrote:
>> I am using the default configuration(maximum 4G heap) and <memoryUsage
>> percentOfJvmHeap="70" />
>> I send many small size TextMessages to server and it hangs
>>
>> I use jmap -heap and found that the free memory is less than 100MB and
>> the server can do nothing but do gc. but gc can't free anything.
>> client can't even connect to server.
>> I use ./bin/activemq stop and it fails to stop server.
>> I have to kill -o pid
>>
>> I guess the reason is that: activemq estimate memory by string size.
>> but for small trings, the heap are all small fragmentations.
>>
>> I modify percentOfJvmHeap to 50 and it works better but after long
>> time, it still occurs.
>
>
>
> --
> Christian Posta
> http://www.christianposta.com/blog
> twitter: @christianposta