I realize few are actively interested in the 3.1.x releases anymore, but
I'll describe the problem anyway.

When starting the server there if often a one minute pause before the
server handles the first request.  The reason appears to be a race
condition in startup.  In the source code for 3.1.8, and every other minor
release I have checked the interesting code is the class
com.caucho.server.port.Port, Port.java lines 1103 to 1105:


The run() method charges ahead from thread.start() and checks if the
lifecycle is active.  It isn't and the thread waits for up to a minute
before trying again.  Meanwhile we call enable() to set the state to
active, but alas to late.
I notice the corresponding code in resin 4.x has "enable" before "start":

Also, according to the tags associated with the change
inclined to believe the change made it into 3.0.28, 4.0.x and the
short-lived 3.2.x series, but missed 3.1.x completely.

I have patched the class locally and it seems to have made all the
difference.  I can now start and be immediately ready for traffic.


Knut Forkalsrud
resin-interest mailing list

Reply via email to