Persisted Sessions Count in Tomcat5.0

I am using Tomcat5.0. I want to find the exact number of sessions associated with application running in the server. By using HttpSessionListener i wrote my logic.So that i can count the number of sessions.My Problem is, Suposse if i stop my tomcat server, the sessions in the server will be persisted. When i restart the tomcat those sessions (*which were pesisted when i stop the tomcat*) will be loaded again. I am unble to find the number of sessions which are loaded. Newly created sessions i can track and i can count. but those persisted session which are loaded when i restart the tomcat are out my count . How can i find the exact number?

Dorababu wrote:
I am using Tomcat5.0. I want to find the exact number of sessions associated with application running in the server. By using HttpSessionListener i wrote my logic.So that i can count the number of sessions.My Problem is, Suposse if i stop my tomcat server, the sessions in the server will be persisted. When i restart the tomcat those sessions (*which were pesisted when i stop the tomcat*) will be loaded again.Is that a requirement? Else you should just turn it off. Its configurable in the server.xml.
I am unble to find the number of sessions which are loaded. Newly created sessions i can track and i can count. but those persisted session which are loaded when i restart the tomcat are out my count . How can i find the exact number?If you have to have sessions persisted, you will have to subclass the PersistentManager class (which is responsible for persisting & reviving sessions across restarts). The only additional functionality that you would add is to register lifecycle Listeners that will be notified of session revivals. Happy googling :)
cheers,
ram.

Similar Messages

  • How to find active sessions count on a server in weblogic server console

    Hi All,
    I would like to know how to find active sessions count on a server in weblogic console. I am using weblogic 11g.
    Regards,
    Sunil.

    On the deployment, monitoring tab, you can select web applications. Here the number of current sessions are listed per web application deployed on the domain.
    The deployment itself (deployments, application, monitoring, sessions) shows a list of sessions and where it is located. Unfortunately, there is no aggregation (but that is something you can so yourself as well).
    When you are using a load balancer in front, the count of sessions on per web application on the domain gives you some clue how many sessions there are present on each server.
    That is to say, when load balancer is using round-robin (and does that correct), you can take the total number of sessions divide it by the number of servers.

  • Session Count not dropping in BOE XI

    Iam calling crystal reports using url reporting. ie. calling OpenDocument.aspx page from a custom asp webpage. Iam able to create a token and then redirect to the OpenDocument.aspx correctly. But iam facing 2 issues :
    1. The session created does not get destroyed on browser close. So, as i open new reports that i have linked as various links on my intranet, new sessions are created. Old ones are not destroyed. this keeps incrementing session count.
    2. In the same browser page, (which was idle for a period of time), if i try to open a new report, at times, iam led to the infoview login page although the redirecting url shows a token being passed. Now if i click the back button on IE and then try to open the report again, it opens.
    Why does this happen ? What can be done to resolve these issues ?
    Any advice is highly appreciated.
    Thanks in advance.

    Thanks for your reply Ted!.
    I was hoping that we could do some custom code from the openDocument page to clean up the sessions.
    Now that we are not able to modify it, dont you think it is going to eat up memory resources on server when we move this to production where we have a large number of users who will be accessing different reports at the same time.  We have quite a large number of reports available for access this way, and accessed by a large number of users. What do you think would be a good approach in this scenario ?
    Regards.

  • Tomcat 5.0.25 persisting session data by default ?!?

    This is, I imagine, a dumb question, but I can't quite figure out what is happening by looking at past postings.
    When I start Tomcat I get an error : "IOException while loading persisted sessions" because some classes we use are not serializable. That makes sense - we didn't design them to be serialized.
    I understand that Tomcat CAN try to persist session data across restarts. However, I do not want it to do this. I thought this was something we had to configure, but it looks like it happens by default (?)
    Anyway ... any advice about how to prevent this behavior, at least for our app, would be appreciated ... really puzzled ... !
    Thanks in advance for any help you can give !!
    ethan

    Well, thanks ... I have been there actually, but it only tells me how to set up the 'Experimental" Persistent Manager and not how to turn this off. Here is an interesting blurb from that site :
    <<<<<
    Whenver Catalina is shut down normally and restarted, or when an application reload is triggered, the standard Manager implementation will attempt to serialize all currently active sessions to a disk file located via the pathname attribute. All such saved sessions will then be deserialized and activated (assuming they have not expired in the mean time) when the application reload is completed.
    In order to successfully restore the state of session attributes, all such attributes MUST implement the java.io.Serializable interface. You MAY cause the Manager to enforce this restriction by including the <distributable> element in your web application deployment descriptor (/WEB-INF/web.xml).
    >>>>>>>
    I THINK this means that persitence is on by default. I'm not certain because - if that is true - then what is the Persisistent Manager for ? I have found thi ssnippet of config in conf/server.xml :
    <<<<<<
    <Context path="/myApp" reloadable="true" docBase="myApp" workDir="C:\myApp\\work\org\apache\jsp" >
    <Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/>
    </Context>
    >>>>>>
    which tells Tomcat to use the Persistent Manager for my app and then ... tells it not to store session data. And this seems to work ... at least the error messages go away. Now, though, I get a new and different error message :
    <<<<<<
    SEVERE: no store configured, persistence disabled
    >>>>>>
    So I am still doing something wrong ... I think ... and still looking for help ... B-)
    Thanks again, black_lotus ... maybe we'll learn about this together ;-)

  • Active session count of an user

    Hi,
    Could you help me understand the concept of active user session count and the factors influencing the active sesssion count of an user
    1) Does running multiple queries in a number of query windows in SQL developer lead to increase active session count?
    2) Does a high degree of parallel option ( e.g. Parallel (Degree 8)) provided in a query lead to a higher session count?
    3) Does the size of data processed in a query influence session count?
    4) Does the complexity of a query influence session count?
    5) Can a session remain active even after completion of a query and thereby increase the active sessioncount?
    Regards
    -Learnsequel

    910874 wrote:
    Could you help me understand the concept of active user session count and the factors influencing the active sesssion count of an userThat depends on the client. Does the client use some form of multi-threading? If so, the client needs a separate and active Oracle session servicing each of its running threads.
    The user may only initiate a single connection to the database - but the application remembers the authentication and connection details and can transparently establish multiple additional sessions. (a common behaviour by TOAD and SQL-Developer)
    1) Does running multiple queries in a number of query windows in SQL developer lead to increase active session count?Yes - as an Oracle session is serialised. It can only execute a single client request at a time. Thus if the client has 3 windows/tabs with each running a SQL query - then 3 Oracle sessions are required to service that client.
    2) Does a high degree of parallel option ( e.g. Parallel (Degree 8)) provided in a query lead to a higher session count?No. PX slave processes are database processes. They only "assist" a session at specific times. Then they can "assist" other sessions with other parallel query processing. The database has a configurable PQ processing pool of processes. You can specify the minimum number of processes to create in the pool at startup. You can specify the ceiling of the pool.
    So no number of sessions can grow the number of PQ processes beyond the maximum size of the pool. And the pool is there to service all sessions. Not just a single session.
    3) Does the size of data processed in a query influence session count?No.
    4) Does the complexity of a query influence session count?No.
    5) Can a session remain active even after completion of a query and thereby increase the active sessioncount?This is default behaviour. If that session terminates, the client looses its database connection.
    In the case of a multi-threaded client, it can decide to close one or more of the transparent "background" sessions it created to the database, when no longer needing such a session. However, it will keep its initial (first) session open as its primary connection to the database.

  • Unable to create/cleanup persistent session data cache

    Hi all
    After the iPlanet Webserver 4.1 SP12 starts up the following entries appears in the error log file:
    [14/Oct/2003:09:24:48] info ( 5999): successful server startup
    [14/Oct/2003:09:24:48] info ( 5999): iPlanet-WebServer-Enterprise/4.1SP12 BB1-12/18/2002 14:18
    14/Oct/2003:09:24:49] catastrophe ( 5999): Unable to create/cleanup persistent session data cache
    What does the last entry mean?
    Thanks for any help :-}
    Best regards,
    Jean-Claude

    Check permissions, disk space of following dirs:
    server_root/https-instance/ClassCache/
    server_root/https-instance/SessionData/
    Try to:
    Clear Session Data
    Delete JSP Class Cache Files
    using the Session Data link under Admin Server GUI Java tab
    Hope it helps!

  • Metric threshold Blocking session count

    Hi,
    I am trying to modify the blocking session count threshould and making warning threshold as null and critical threshold > 0. When i create a blocking session in the database i get the warning for application wait class but i don't get a critical alert generated even waiting for more than an hour. Here is what i have done so far
    1. changed the warning threshold to null, critical threshold to > 0 and changed the time of collection to each 5 minutes.
    2. Creating a blocking lock in the database, when i go on the performance page of db and look at the instance locks i can see the lock being held for more than 30 minutes
    Any ideas how can i get this going will be much appreciated.

    In order to trigger the metric "blocking session count", you have to
    a. have one session which is holding the lock (not comitting)
    b. at least one session which is waiting for exactly that lock. in that case, the metric will report sid of blocking session with a value of > 0.
    Regards,
    Martin Decker
    www.ora-solutions.net

  • Active session count of ASA in HA

    Hi,
    We have configured our ASA5540 in active-standby failover.
    We are observing that current active session count is twice of session count before configuring HA. Earlier average active session was 50000 and now after HA it is around 100000. Kindly let us know the reason for same.
    Failover configuration of both firewall are as follows
    failover
    failover lan unit primary
    failover lan interface FOLan GigabitEthernet1/0
    failover polltime unit 15 holdtime 45
    failover replication http
    failover link StateLink GigabitEthernet1/1
    failover interface ip FOLan 10.3.3.1 255.255.255.0 standby 10.3.3.2
    failover interface ip StateLink 10.4.4.1 255.255.255.0 standby 10.4.4.2
    failover
    failover lan unit secondary
    failover lan interface FOLan GigabitEthernet1/0
    failover polltime unit 15 holdtime 45
    failover replication http
    failover link StateLink GigabitEthernet1/1
    failover interface ip FOLan 10.3.3.1 255.255.255.0 standby 10.3.3.2
    failover interface ip StateLink 10.4.4.1 255.255.255.0 standby 10.4.4.2
    Regards,
    Mukesh Tiwari

    Hi,
    I guess you have check this with "show conn count" or "show conn" commands on the ASA?
    Ofcourse the first thing that comes to mind is that its somehow adding up the connection count of both ASA units. Though it shouldnt do this to my knowledge. You should just see almost equal amount of connections on both units. Both Primary and Secondary.
    Have you tried to check if there is any host on your local network that would be taking alot of connections? Maybe somethings happened at the same time (even though it might not be likely)
    Have you noticed any performance issues/problem after this upgrade to a A/S ASA pair?
    - Jouni

  • Error at tomcat starting :IOException  while loading persisted session. : j

    I am gettin error when tomact starts.error is like this "IOException while loading persisted session. : java.io.writeabortedexception.;writing aborted;java.io.Notserializable exception.
    what is this error .I think it is due to session scope of bean.what care shold be taken if you are using session scope.please help me;
    thanks

    To where are you persisting your sessions? If you don't care about session persistance, try making this change in your server.xml.
    <Context path="/myApp" reloadable="true" docBase="myApp" workDir="C:\myApp\\work\org\apache\jsp" >
    <Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/>
    </Context>I got this from http://forum.java.sun.com/thread.jspa?threadID=575302&messageID=2871444
    Check it! Bo!

  • Session counter vs cfschedule

    Hi all,
    Got a bit of a riddle here. Trying to count current active number of sessions and as per ColdFusion documentation that should be done as follows:
    onSessionStart:
    <cfset Application.sessions = Application.sessions + 1>
    onSessionEnd:
    <cfset Arguments.ApplicationScope.sessions = Arguments.ApplicationScope.sessions - 1>
    That all works as expected as long as one doesn't use cfschedule events. Now in my application cfschedule runs every minute as a result creating  new sessions as it goes. What I'm trying to do is detect cfschedule event as a session 'runner' and ignore it for my session totals.
    On session start, that is done as follows:
    <cfif FindNoCase("CFSCHEDULE",CGI.HTTP_USER_AGENT) EQ 0>
         <cfset Application.sessions = Application.sessions + 1>
    </cfif>
    This way cfschedule is not counted as a site user, hence not logged.
    Now my question to the community is:
    How do you detect cfschedule event on session end? I was unable to locate any documentation explaining what sort of information is being passed inside the sessionScope to onSessionEnd function, hence how to access CGI info (if it's possible at all).
    Absolutely any input on this would be highly appreciated!
    Regards,
    Simon

    Hi guys,
    cfchedule event starts a new session itself. As well as that it seems it's a session just like the one user would start loading the site. Therefore, as any other session it runs the session counter (Application.sessions) and increases it.
    I have managed to successfully detect it upon start with the code provided in my initial post.
    To answer to BKBK, if on session end, which was started by cfschedule event I would not run the same test to check whether the session in fact was initiated by the cfscheduler, the counter would be reduced.
    Your suggestion does not help to solve the issue as counter meant to display only the sessions started by visitors, hence genuine data on the current site activity. An example to explain it in detail:
    At a sample given time I have 5 users online. Then cfscheduler runs and creates extra session. I detect it and skip counter logging. At this moment I still have 5 users. Now let's assume the same users are browsing the website and sessions are extended beyond the original 30 minute timeout of inactivity. After 30 minutes cfscheduler's session will expire and run through the onSessionEnd function. If I would not detect it as such, the counter would be reduced to 4, even though 5 users are currently online. There's the problem I'm trying to solve.
    The solution I have posted is still not 100% confirmed as sometimes it indeed shows some weird statistics.
    Simon

  • How to find the max session count and process count for a database

    Hi All,
    How to find the maximum session count and process count reached for a database over a period of 15 days?
    DB version:11.2.0.2
    OS:AIX

    Thanks for the link.
    The output of the below query that is given in the link shows the results for the last 10 or 12 days.. Is there a query which gives a result for the last 30 days?
    col metric_unit for a30
    set pagesize 100
    Select trunc(end_time),max(maxval) as Maximum_Value,metric_unit
    from dba_hist_sysmetric_summary
    where metric_id in ( 2118,2119) group by trunc(end_time),metric_unit order by 1;

  • WSRP HTTP Session count increase

    Hi,
    I notice that the session count increases considerably(in hundreds) at the WSRP producer with the simple refresh of the remote portlets in count. Is there a way to avoid those sessions?
    I'm using WLP 10.2 producer and WLP 10.2 consumer.
    We have the portlet preference set to the remote portlets. We suspect that this may be reason for the increase session count.
    Thanks,
    Edited by: user10874417 on Dec 27, 2010 7:50 AM

    This situation occurs when the producer and consumer cookies are configured.
    Did you try Using Different Cookie Names and are you using SSO on producer and consumer ? If yes, did you try to use System Property.
    For details refer Configuring Session Cookies, in Federated Portals Guide.

  • Maximum session count for Optimization on WAAS

    Hi all, i've currently two different types of hw in use.
    WAE612 an NM-WAE502.
    now i want to know the maximum session count for a WAE 512.
    On 502 we have a maximum of 500 sessions
    On 612 we have a maximum of 6000 sessiones.
    could you give me the maximum session count on WAE512?
    thx in advance
    Dieter

    Hmm, so i think it's the best to replace the NM due a WAE512.
    however, i've currently the problem, that the TFO session count reaches the maximum a few times per day.
    Now the question is:
    What is the best way to avoid a TFO session exceed?
    Is it O.K. to modify the policy. The Idea is to pass through traffic, which has only a poor benefit of WAAS (such as SAP).
    The question here is: Has a pass through on the policy any impact to the TFO counter?
    The second idea is to redirect only definded traffic via WCCP? Is there a way to do it in this way?
    thanks for your help

  • Resolve session count

    Hi,
    What would be the most simple way to resolve number of http sessions of certain web application deployed to standalone oc4j using remote host and command line?
    Any good suggestions?

    I guess I made a silly mistake...
    I didnt import java.servlet.http.*;
    My codes are:
    public class  tree
        public tree() {}
    public void display(  String temp,   HttpServletRequest request)
                                  throws  IOException     {
        try
            HttpSession session = request.getSession(true);
            if ((session == null) && session.isNew())
               session.setAttribute("counter", new Integer(0));
    ... //rest of the codes
    how should my calling method be written?
    tree.display(temp, ????);
    Please help thanks!

  • RAS session count

    Hi,
    In my configuration, the RAS Java SDK is used to access some unmanaged reports stored in a server folder. In the same web browser session, it is noted that for each report opened, the CAS count will simply increment accordingly. Is that normal? Shouldn't the licensing be based on the RAS session connected? Is it related to my way of calling the RAS API?
    Thanks,
    John

    Answering what I can below in Italics.
    From the kb note, it seems I can programmatically (instead of interactively) invoke the query and kill the session, right?
    Yes
    Does that mean I also have to use the Enterprise SDK as well (in addition to the RAS/View SDKs)?
    Yes
    So an extra Enterprise logon (and thus a CAL session) is needed to kill the session?
    Not if you use the Enterprise Logon that you used to view the report, I believe it can nuke itself. I have not tried this.
    Assuming I can kill the session, but which session to select and kill? Is LOGONTIME is the nearest field for identifying my own session?
    I believe so, Adam may be able to answer this.
    Plainly speaking, what I want to achieve is when user closes the report browser window, his Crystal server session also ends accordingly. And a single web session corresponds to a single RAS connection session.
    Thank you,
    John

Maybe you are looking for

  • Help with the a query -

    I have the table test1 with a date field stored as character 7 field. (which is for CYYMMDD) C - century indicator and there are 3 rows in that table for testing purposes. One of them has a value 9999999 which is a incorrect value for a given date. I

  • Excel Filter not working in Bex

    Hi All I have a report in Bex where I have a date field called basic date. Now when user is trying to select some basic function like greter than or less than a particular date(When we apply filter in excel we have the optioon Custom where so many op

  • Itab move corresponding

    hello abap gurus, in my requirement, all the records in ITAB1 need to be moved to ITAB2  where both have a common key field which should match. Note: ITAB1 and ITAB2 have only few common fields. ITAB2 is completely empty. can someone tell the best wa

  • Same Query...Same DB Instance....Different results

    Hi, I'm running into an issue in which I'm seeing inconsistent results. If I run a query against a static table (fully committed) sometimes I receive one result set and at other times I receive another result set.This does not seem to be limited to a

  • Do not want google as a search engine, want to remove from firefox

    Do not want Google search on Firefox homepage. Is Firefox Google generated or independent; please advise! Much thanks, m