Hi,

My MINA server has a 2 filter chain (A and B - where output of encoder A is
further encoded by B and then sent out on the wire). Now everything works
fine under normal load (20 clients with incoming 20 msgs/sec and outgoing
100 msg/sec). But when I increase the load - I randomly start getting
exceptions with cause *"don't know how **to handle message of type 'X'**.
Are you missing a protocol encoder?"*. This message of type 'X' is the
output of my filter A's encoder and input for filter B's encoder. I added
a bunch of logs and see that in the failure case, my filter B never
received the output of filter A and this exception followed. I also logged
the threadids and see that when this occurred, thread 't' had encoded the
message through filter A and then started encoding another message through
filter A. Then the exception occurs and same Thread 't' continues encoding
the other message through filter B. So its like it completely forgot to
encode the earlier message through filter B. In the good cases, thread 't'
would after encoding an object through encoder A always encode that through
encoder B before doing anything else.

Another thing is that when I only have one filter - even under higher
stress, things work fine.

Sorry for the longish description - hope someone can help me identify whats
going wrong.

Thanks!
Dhruv Chopra

Here is the stack in case it helps -
java.lang.IllegalStateException: Don't know how to handle message of type
'X'.  Are you missing a protocol encoder?
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.flushNow(AbstractPollingIoProcessor.java:902)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.flush(AbstractPollingIoProcessor.java:799)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$700(AbstractPollingIoProcessor.java:68)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1146)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Reply via email to