[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] memory leak? FIXED
Hi 刘 文
thanks for reporting this bug.
It is fixed now and available with CVS.
Could you please confirm that the problem disappeared?
best regards,
Marcel
PS: Remove all files in
xmlBlaster/src/java/org/xmlBlaster/engine/admin/extern/snmp
after cvs update, they currently don't compile.
>Hi,
>
>I found the following question:
>
>The publisher send volatile messages( 1K size each) and the subscriber received it. When the publisher send about 30000 message, it got the OutOfMemory Exception.
>
>I used the OptimizeIt Profiler to debug the server. finding that every time a message is published, A MessageUnitHandler and SubscribeInfo instance produced and they would never GCed even if the client loged out.
>
>
>my publish code
>//======================================================================
> String xmlKey = null;
> PublishQosWrapper qw = new PublishQosWrapper();
> qw.isVolatile(true);
> System.out.println("qos = " + qw.toXml() );
> byte[] b = new byte[1024];
> while(true){
> synchronized(this){
> if ( _bQuit ) break;
> }
> lCount++;
> xmlKey = "<key oid='" + lCount +
> "'> <topic id='aaaa'/>" +
> "</key>";
> _conn.publish(new MessageUnit(xmlKey,b,qw.toXml()));
>// System.out.println(new Timestamp(System.currentTimeMillis())+":"+lCount);
> Thread.currentThread().sleep(1);
> }
>
>regards,
>
>liuwen.
>
>
>
>