I guess that's really the question, at what point in a request does the session get extended?
In any case, I think I may have found the culprit, and it's not this. There's a piece of code I don't like that initializes a struct in session scope, but it doesn't do that atomically. It should create the struct as a local, then set the session var to that local. As of now, it makes a new struct in session scope, then builds the whole thing * in session scope *, which seems like a race condition magnet.
Ugh. Old code.