Apache ODE

Servicemix Tweaks to improve App Performance

The story behind this post

I have been using the Servicemix ESB ( Version 3.3.1 ) for quite some time for an Integration project. In quick words, this is how the App Architecture looks like.

The ActiveMq component embedded inside the SMX recieves JMS messages from an external client. Now, i have a Camel processor listening to the ActiveMQ broker ( ie the queues set up on the broker ). When a message arrives in of the queues, the camel PROCESSOR picks it up and forwards it to a BPEL process being executed by the ODE BPEL Engine ( Version 1.3.3 ). Within the BPEL process, it calls webservices hosted outside the ESB environment through an HTTP Provider Binding component.

The Problem

When the load to the App increases ( ie high number of concurrent requests ) , the BPEL engine fails to handle some of the requests passed to it and it inevitably throws the No Such Channel Exception eventually hangs.

The Solution

After a few days of frantic searching and posts on Apache Servicemix and ODE messageboards, this is what i found out.

The reason why the BPEL Engine stops responding to requests is because of the following reasons

1. Servicemix Thread Freeze :  ie there are too less number of threads within the servicemix to process these request.

Solution : This can be solved by re configuring the Threadconfiguration specified in the servicemix.properties in the conf folder in Servicemix. After reconfiguring , my configuration looks like this

servicemix.corePoolSize    = 100
servicemix.maximumPoolSize = 200
servicemix.queueSize       = 10

The corePoolSize specifies the number of initial threads available inside Servicemix. The quesize specifies the number of requests which will be queued before starting to spawn new threads up till a maximum limit as specified by the maximumPoolSize.

Find more about the Servicemix Thread Pool Executor (TPE ) here

2. Not enough threads within the BPEL Engine to handle the different process activities.

Solution : This can be solved by reconfiguring the corepoolsize property mentioned in the ode-jbi.properties file of the ode bpel engine. The ode engine comes inazipped format, so u will have to unzip the file, edit the ode-jbi.properties file and then re-zip and redeploy it again.

Find below, the configuration that i use


The Story Now

The BPEL Engine has stopped hanging ie it doesn’t miss any requests anymore, but on the flip side the NoSuchChannelException continues to flood the Servicemix logs. Maybe, there is more to it than what meets the eye.

Hoping to solve that and get it posted here at the earliest.


The Nonsense Blogger !!