the max_connections property is set to 0 (unlimited number of connections) but still the ems server keeps on spitting out this to tibemsd.log
[admin:somehost]: connect failed: reached maximum number of connections 0
how can this be possible?
Thanks!
On
For anyone interested,
it appears that there is a limit of maximum 256 admin connections that can be open concurrently to the ems server. This limit is apparently not controlled by the max_connections property for some reason.
Here is a small example to verify this.
import com.tibco.tibjms.admin.TibjmsAdmin;
public class AdminConnectionTest{
public static void main(String args[}){
int counter =0;
try{
for(int i=0;i<1000;i++){
TibjmsAdmin admin = new TibjmsAdmin("tcp://localhost:7222","someuser","someuser");
counter++;
}
}catch(Exception e){
System.out.println( "Connections created: "+counter);
System.out.println( e.getMessage());
try{
Thread.sleep(20000); //Some delay to make it possible to verify this from emsadmin
}catch(Exception ee){System.out.println( ee.getMessage());}
}
}
}
To protect on the client side from overloading the server with connections, I wrote a simple commons pool2 class.