-
Notifications
You must be signed in to change notification settings - Fork 73
"Unable to load session attributes" warning #5
Comments
Hey KB, thanks for reporting this. My guess would be that the data wasn't able to be loaded from DynamoDB, possibly because it was removed by some process. We'll have to dig in a little more on this, and see if we can debug through a repro case. Let us know if you find any more clues on your end. |
I am having that same issue, tons of spam about being unable to load session attributes for session XXXXXX We are using tomcat 7 and spring security, and we are using the latest 1.0.1 jar file from github In the amazon account management, I created an AWS keyset that only has full access to DynamoDB I can see the session entity getting created in Dynamo, but not sure how to gain insight here inside the JAR as far as what is going on, and where this error is coming from, any advice on how to proceed with this? |
Hey Override11, do you see the same session ID being stored in Dynamo, but Tomcat isn't able to load it? Or is it missing from Dynamo, too? (just wanted to confirm) We'll see if we can repo the error messages. Let us know if you have any additional information for the repro case. |
I will circle back when I get home, but iirc the session was named
|
in fact, it appears that its trying to load a session that does not exist In dynamoDB its showing: "19759199FF93D8648A738140B2E35900" in my application, I'm getting: 2013-12-06 19:42:55| http-bio-8888-exec-4 | WARN | com.amazonaws.services.dynamodb.sessionmanager.DynamoDBSessionManager.warn(): Unable to load session attributes for session EC0A93613FA69310498C4B4ABEDC9DF8 thats curious, wonder what is causing that... Yes I am able to login to my application, even if I get that error, but I certainly don't fail-over in the event of a server switch in our load-balanced cluster |
The ExpiredSessionReaper deletes all sessions older than the deafult value from the store or the webapp. If you use session specific timeouts (greater than default), the reaper will deleted the session although the session should still be valid. |
Do you have fix this issue? I am having the same problem. Jan 08, 2014 3:42:21 PM com.amazonaws.services.dynamodb.sessionmanager.DynamoDBSessionManager warn This sessionId does not exists at Tomcat_SessionState in DynamoDB. |
I'm having the same problem as y'all and have yet to figure it out. However, I did just run across this rather ominous note in the documentation for the AWS DynamoDB Tomcat Session manager (from the bottom of http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/java-dg-tomcat-session-manager.html): Limitations The session manager does not support session locking. Therefore, applications that use many concurrent AJAX calls to manipulate session data may not be appropriate for use with the session manager, due to race conditions on session data writes and saves back to the data store. |
In fact, i discovered that sticky session option is available. ;) 2014-05-07 1:51 GMT+02:00 eniveld notifications@github.com:
https://twitter.com/i72peesj Juan Luis Pérez Estrella Antes de imprimir este correo piense si es realmente necesario; Please Este mensaje contiene información reservada y confidencial destinada Le informamos que sus datos personales, que puedan constar en este mensaje, |
I am looking at the source to DynamoDBSessionManager.java and I see this line of code in the constructor:
Here's the scenario I'm worried about. Say I've got a beanstalk cluster with 2 EC2 servers going, and no session stickiness. The user goes to server 1, and then a few minutes later goes to server 2, and then stays with server 2 for a while. Meanwhile, after 2 hours, his session on server 1 expires and the session is removed from the store. Even though server 2 is still actively going. Then we get an error that the session is missing. Should it not be respecting the session-timeout set in web.xml? Am I misinterpreting the code? |
That only controls when sessions are expired, not how often they get persisted. I wouldn't recommend going without sticky session, but if you do, then you must force sessions to persist quick enough that the current session will be on the DB to be swapped in by other servers, and keep maxIdleSwap = maxIdleBackup, so you don't come back to a server with a stale session in memory. If you have sticky session, then this risk is minimized, and longer swap than backup allows ongoing activity to be handled by same server without having to swap in, while making frequent backups as a hedge against server outage, for failover. Look at processExpiresFrequency, maxIdleBackup, maxIdleSwap, minIdleSwap, backgroundProcessorDelay. On May 6, 2014, at 8:39PM, eniveld wrote: |
We are testing the DynamoDB session manager and have altered our test to use smaller sessions (thanks for the response on my last issue BTW).
Now, when we try to fail over from one server to another by removing an instance from the ELB we often see this error:
WARNING: Unable to load session attributes for session 0F80C708C7FA5F4CF85164AA8DF7FF5A
Nov 15, 2013 3:24:50 PM com.amazonaws.services.dynamodb.sessionmanager.DynamoDBSessionManager warn
When this happens it seems the user experiences receiving a new session. Is there a configuration setting we're missing to fix this? We've tried maxIdleBackup, but that doesn't seem to help.
Thanks,
KB
The text was updated successfully, but these errors were encountered: