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();
  }
}

source:
http://codefinder.org/viewFile/internalUpdateSessionManagerTimeout/https%3A%5Es%5Essvn.strategoxt.org%5Esrepos%5EsWebDSL%5Eswebdsls%5Estrunk%5Essrc%5Esorg%5Eswebdsl%5Esdsl%5Esproject%5Estemplate-webdsl%5Esbuilt-in.app/WebDSL#26

related:
https://yellowgrass.org/issue/Reposearch/53

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