When it is time to update lastUse, a transaction conflict can occur, especially when the application uses many ajax requests.

function internalUpdateSessionManagerTimeout(){
  var n : DateTime := now().addMinutes(-30);
  var man := getSessionManager();
  if(man.lastUse == null || man.lastUse.before(n)){
    man.lastUse := now();



quick workaround:
- update less often
- don’t do the update in a submit/post or ajax request (where there is a bigger chance to have simultaneous requests or in quick succession)

A more thorough fix would be to handle the transaction error gracefully, perhaps this update needs to happen in a separate transaction that is allowed to fail without breaking the server response.

Submitted by Danny Groenewegen on 12 July 2013 at 12:47

Log in to post comments