Hi there,

while performing some load testing of our web-application, we noticed that
all of our threads got BLOCKED by synchronized in the following code in
AbstractSessionIdManager



 public String newSessionId(HttpServletRequest request, long created)
    {
        synchronized (this)
        {
 ....

            while (id==null||id.length()==0||idInUse(id))

....

}
}


We're using the JDBCSessionIdManager, and since idInUse performs a sql call
in our case, this won't perform well.

We tried using a hazelcast-based session id manager we found on github, but
that too gets stuck (as in threads are BLOCKED) when the load is high
enough.

The question now is, why is this code in a synchronized block? When using a
jdbc-based session id manager, I believe it would make sense to rely on
database mechanisms to ensure sessionids are not reused etc instead of
using a synchronized block'.

Does anyone have any thoughts on this?

Cheers,

Stefan
_______________________________________________
jetty-users mailing list
jetty-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to