difficulty getting a SessionInfoDumper to work

View: New views
3 Messages — Rating Filter:   Alert me  

difficulty getting a SessionInfoDumper to work

by harryh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Trying to get a SessionInfoDumper to work and having some troubles.

When running locally on production or staging I do see session
expiration messages in the log files, but never anything from the
SessionInfoDumper (which I copied directly from the example app).

When running locally on my dev box I don't see expiration message or
SessionInfoDumper messages (though the former could be because I've
never sat around for 30 mins waiting for a session to expire).
Looking at the code, it's unclear to me how the first CheckAndPurge
ever gets sent to SessionMaster. Given this confusion, if I add this
(thx to Jon Hoffman for coming up with this idea):

SessionMaster.getClass.getMethods.find(_.toString.contains
("doPing")).get.invoke(SessionMaster)

to Boot.scala, I do start to see logging messages from my
SessionInfoDumper.

So I'm fairly confused about what is going on here:

A) Is there something in this area where running in dev mode should be
different from when I run in production (inside of jetty)?
B) How, in fact, is that first CheckAndPurge message supposed to get
sent to SessionMaster?
C) Any ideas on why I might be getting Session expiration messages(1)
but nothing from my SessionInfoDumper when running in production?

-harryh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb@...
To unsubscribe from this group, send email to liftweb+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: difficulty getting a SessionInfoDumper to work

by harryh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


OK, I think I know what is going on here.

In production I'm still on M6, so it's non on lift actors yet. And I
forgot to start the SessionInfoDumper actor (doh!).  So that explains
why I am seeing sessions get expired in prod, but never see any
messages from my SessionInfoDumper.  Messages are getting sent to it,
but since it's never started, it's not processing them.

OK, and in Dev I'm on M7.  And I am now convinced that there is a bug
introduced in M7 where no CheckAndPurge message is ever sent to
SessionMaster so it will never purge expired sessions or send messages
to sessionWatchers. I've looked back at the M6 code and I see how
everything starts up correctly, but in M7 it looks no good.

This seems like a moderately serious bug.  For now I'm adding:

SessionMaster.getClass.getMethods.find(_.toString.contains
("doPing")).get.invoke(SessionMaster)

to my Boot.scala to get around it.  Others using M7 may want to do the
same (pending confirmation from dpp that I have correctly analyzed the
situation).

-harryh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb@...
To unsubscribe from this group, send email to liftweb+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: difficulty getting a SessionInfoDumper to work

by bearfeeder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yeah, the LiftSession initial pinger didn't get started.  This is the second serious defect in M7 (the other being #164).

We're mulling doing an M7A that resolves these issues.

On Fri, Nov 6, 2009 at 1:45 PM, harryh <harryh@...> wrote:

OK, I think I know what is going on here.

In production I'm still on M6, so it's non on lift actors yet. And I
forgot to start the SessionInfoDumper actor (doh!).  So that explains
why I am seeing sessions get expired in prod, but never see any
messages from my SessionInfoDumper.  Messages are getting sent to it,
but since it's never started, it's not processing them.

OK, and in Dev I'm on M7.  And I am now convinced that there is a bug
introduced in M7 where no CheckAndPurge message is ever sent to
SessionMaster so it will never purge expired sessions or send messages
to sessionWatchers. I've looked back at the M6 code and I see how
everything starts up correctly, but in M7 it looks no good.

This seems like a moderately serious bug.  For now I'm adding:

SessionMaster.getClass.getMethods.find(_.toString.contains
("doPing")).get.invoke(SessionMaster)

to my Boot.scala to get around it.  Others using M7 may want to do the
same (pending confirmation from dpp that I have correctly analyzed the
situation).

-harryh




--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to liftweb@...
To unsubscribe from this group, send email to liftweb+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---