geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Sisson <>
Subject Re: Failure when looking up an EJB consecutively
Date Sun, 01 Oct 2006 11:50:17 GMT
Arunanthisivam Vimalathithen wrote:
> Hi,
> I am having a problem in an application I am trying to port to 
> WebSphere community edition which basically uses Geronimo 1.0 (This 
> problem exists in the latest version of Geronimo (1.1.1) as well). The 
> client I am using looks up the service numerous times consecutively 
> and invokes the services. The problem happens when this has gone past 
> more than 630 times, the client simply fails to look up and produces 
> the following error:
> _java.rmi.RemoteException_: Cannot access server: / 
> Exception: ; nested exception is: _ Cannot 
> access server: / _Exception_: : 
> Address already in use: connect
> The same error can be produced by looking up and invoking a simple 
> hello world EJB in a loop of 700 times. This happens in the latest 
> release of Geronimo (sometimes the loop might need to be increased to 
> 1000). Any work arounds to this?
> Thanks and regards,
> Vimalan

If you are on Windows you can encounter problems if a large number of 
socket connections within a short period of time, causing Windows to 
exhaust its pool of ephemeral ports (default is port range 1024-5000). 
When each of these connections is closed, they will remain in TIME_WAIT 
for a period of time (default of 240 seconds) before the ephemeral port 
is available. Windows will not reuse a port until it has exhausted its 
pool of ephemeral ports. If this problem occurs, you need to set the 
[MaxUserPort] to a larger value and reduce the [TcpTimedWaitDelay] in 
the registry settings. See the following for further details: and

Each InitialContext you create will cause a TCP connection to be started 
to OpenEJB.  See some notes about the processing going on whilst 
creating an InitialContext in .
AFAIK, each remote call will also start a connection.  AFAIK, some other 
app servers may leave connections open for a period of time and re-use 
them, therefore reducing the chance of hitting this problem of 
exhausting the pool in windows.



View raw message