We did some heavy load testing and discover thread contention during using Continuations. Problem appeared near 10K BOSH users with 30 sec ping.
I recommend you replace org.jivesoftware.openfire.http.HttpConnection method
private String waitForResponse() throws HttpBindTimeoutException {
if (continuation.suspend(session.getWait() * JiveConstants.SECOND)) {
String deliverable = (String) continuation.getObject();
// This will occur when the hold attribute of a session has been exceded.
this.isDelivered = true;
if (deliverable == null) {
throw new HttpBindTimeoutException();
}
else if(CONNECTION_CLOSED.equals(deliverable)) {
return null;
}
return deliverable;
}
this.isDelivered = true;
throw new HttpBindTimeoutException("Request " + requestId + " exceeded response time from " +
“server of " + session.getWait() + " seconds.”);
}
by the
private String waitForResponse() throws HttpBindTimeoutException {
continuation.suspend(session.getWait() * JiveConstants.SECOND);
if (continuation.getObject() != null) {
String deliverable = (String) continuation.getObject();
// This will occur when the hold attribute of a session has been exceded.
this.isDelivered = true;
if(CONNECTION_CLOSED.equals(deliverable)) {
return null;
}
continuation.setObject(null);
return deliverable;
}
this.isDelivered = true;
throw new HttpBindTimeoutException("Request " + requestId + " exceeded response time from " +
“server of " + session.getWait() + " seconds.”);
}
Please, correct me, if i was wrong in my assumption.
Thanx!