Greetings,

We were noticing some 'No processor available' exceptions
associated with the Ajp13Connectors under heavy load.
I downloaded the Tomcat 4.0.6 connectors source and had
a look at the code responsible for creating a new processor to
handle an incoming Ajp13 socket connection from Apache.

In org.apache.ajp.tomcat4.Ajp13Connector.java, in the
createProcessor() method, I noticed that there was no logic
to handle the case if maxProcessors was configured to "-1"
for infinite processors. In the HttpConnector source, if
maxProcessors was "-1", then it returned a newProcessor().
I modified this createProcessor() method to function in the
same manner and the Ajp13 "No processor available"
exceptions disappeared.

private Ajp13Processor createProcessor() {

synchronized (processors) {
if (processors.size() > 0)
return ((Ajp13Processor) processors.pop());
if ((maxProcessors > 0) && (curProcessors < maxProcessors))
return (newProcessor());
else {
if ((maxProcessors < 0)) // my new code returns a new processor
return (newProcessor()); // if maxProcessors is "-1", aka infinite.
else return (null); // original else return result
}
}
}

My question then, is this a bug in the Ajp13Connector functionality?
Or is there some design reason to not allow the user to configure
the Ajp13Connector for infinite processors via the "-1" option.
I couldn't locate any documentation that says Ajp13 connectors
cannot and should not be configured for infinite processors.

Thanks,

Eric Scroger





--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to