Hi,
I have a servlet that connects with an Ice server and implements a basic search page. The servlet works fine with a lot of load (I'm testing with JMeter, with 50 concurrent users per second). Now I'm testing the same functionality with ColdFusion MX (Developers Edition, that it's free), and when I run the JMeter test plan during 5 minutes, the Ice ThreadPool launches this exception:
java.lang.OutOfMemoryError
at java.nio.Bits.reserveMemory(Bits.java:618)
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer. java:95)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java :285)
at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java :54)
at sun.nio.ch.IOUtil.read(IOUtil.java:205)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImp l.java:207)
at IceInternal.TcpTransceiver.read(TcpTransceiver.jav a:236)
at Ice.ConnectionI.read(ConnectionI.java:1061)
at IceInternal.ThreadPool.read(ThreadPool.java:898)
at IceInternal.ThreadPool.run(ThreadPool.java:698)
at IceInternal.ThreadPool.access$100(ThreadPool.java: 12)
at IceInternal.ThreadPool$EventHandlerThread.run(Thre adPool.java:1194)
This is the Java object that all the requests in ColdFusion shares:
public final class Lucene {
private static TCommand tCommand = null;
private Lucene() {}
private static TCommand getTCommand() throws TExecuteException {
if (tCommand==null){
TCommand c;
try {
c = new TCommand("lucene_conf.xml");
} catch (TExecuteException te){
// blablabla exception
}
Lucene.tCommand = c;
}
return Lucene.tCommand;
}
public static final TResultSet search(Map map) throws TExecuteException {
return getTCommand().execute ( "search", map);
}
}
I'm sure that all the threads in ColdFusion shares the same instance of TCommand (the object that connects with the server). In the constructor of TCommand I initialize the Ice.Communicator, and in the execute method I only connect with the remote object. TCommand is used in the servlet that works fine.
The test plan is the same in the Tomcat test and ColdFusion Test. Has Ice some problem with ColdFusion MX? Is my class Lucene? (I have read somewhere that is not a good idea to create threads in a J2EE server, and perhaps ColdFusion crashes with the ThreadPool... I don't know...)
Cheers, and thanks a lot!

), and when I run the JMeter test plan during 5 minutes, the Ice ThreadPool launches this exception:
Reply With Quote
