Maximum number of sessions has already been reached...

I have a web application which is made up of a servlet and some jsps. I run a test which puts a load on the webserver which sends multiple requests to the webserver so we can monitor the load.
The problem is, my application is not handling anything gracefully when the webserver reaches it's max # of sessions. I don't want to change the default 1000 sessions, but I want to direct users to a friendly error page if this situation ever occurs.
This is the beginning of my doGet method:
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try {
java.sql.Date fromDate = null;
java.sql.Date toDate = null;
String storySection = null;
int history = 0;
int numberOfRecords = 0;;
HttpSession session = request.getSession(true);
System.out.println("Checking if session is null***");
if(session == null) throw new SQLException("SESSION IS NULL!");
if(request.isRequestedSessionIdValid() == false) throw new SQLException("SESSION NOT VALID!");
System.out.println("Session passed fine!!!!!!!!!!!!!!");
This is the output from iPlanet 4.1SP5 errors log file:
--- (messages before this point were just loading jsp + servlets; i.e. no errors before this point) ---
[28/Feb/2002:09:44:21] info (21849): Internal Info: loading servlet /mmd/SquawkMessage.jsp
[28/Feb/2002:09:48:09] warning (21849): SimpleSessionManager: cannot create a new session as the limit on maximum number of sessions has already been reached: (1000)
[28/Feb/2002:09:48:09] failure (21849): Internal error: exception thrown from the servlet service function (uri=/mmd/SquawkHeadlines.jsp): java.lang.NullPointer
Exception, Stack: java.lang.NullPointerException
at jsps.mmd._SquawkHeadlines_jsp._jspService(Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at com.netscape.server.http.servlet.NSServletRunner.Service(Compiled Code)
--- (messages after this point were more of the same until I killed the load test) ---
Any advice? I need to find out how to handle this problem gracefully.
Thank you,
Karen
[email protected]

Hi,
You can have an application variable that increments by one, when each new session is started. That way you can check whether the total no.of sessions have reached 1000, if yes, u can redirect the user to an error page.
Please get back to me if u still can't get the problem solved.
SURESH B
[email protected]

Similar Messages

  • The process could not be created because the maximum number of asynchronous responses (5) has already been reached, and it will be dropped.

    Hi
    he process could not be created because the maximum number of asynchronous responses (5) has already been reached, and it will be dropped.
    Command executed:    "C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe" -command "&G:\SCOM\SCOMModule\Notification\SMS.ps1 -scomalertid:'{c5a013e7-5408-468a-9b04-febab33cc56d}' -alertname:'Common Primary Database TableSpace
    Threshold Alert' -alertdesc:'TableSpace TEMP FreeSizePercent:0.4375\n' -alertstate:'Closed' -alerttime:'7/26/2014 1:55:19 PM' -Priority:'1' -Severity:'2'"
    Working Directory:    g:\SCOM\SCOMModule\Notification
    One or more workflows were affected by this.  
    Workflow name: Subscription852fbf70_40eb_450c_874d_46b631ca1352
    Instance name: Alert Notification Subscription Server
    Instance ID: {E07E3FAB-53BC-BC14-1634-5A6E949F9230}
    Management group:******
    Please help me
    Thanks

    Hi,
    the RMS is "Root Management Server". When you install first management server it becomes RMS. The RMS is relevant in SCOM 2007x management group. You can identify which server is RMS in administration console under management server view. Look for instance
    with "yes" value in "Is RMS" column.
    If you have SCOM 2012x version management group create sugested registry entrys on all management servers (MS) which executes command channel.
    This will surely solve your
    problem.
    Regards,
    Ivan

  • How do you search through configured Alternate Extensions to correct error message : The phone number or extension has already been assigned to some other object.

    When configuring a new Unity Voicemail Account I receive this message : The phone number or extension has already been assigned to some other object. I understand that this means that the 10 digit number I am trying to configure as the alternate extension for this user is already configured for another object with Unity.
    I need to search by the 10 digit number and determine where it is configured so I can change it and map to the correct end user.
    I have attempted to to search Users via DTMF Access ID using the 10 digit number with nothing being returned via that search.
    How do I Search all of the copnfigured Alternate Extensions within our Unity Server?

    A subscriber info dump is likely the fastest way.  If you're curious regarding other methods, you can also use the Data Link Explorer (CUDLE) tool which is in the Cisco Unity Tools Depot.  All extensions for all objects are referenced in the "DTMFAccessId" table.  The View menu has a Query Builder which you can use to compile a SQL query that searches for a digit string.  It's best to search for both the 10 digit string as well as an abbreviated string as Unity sees them essentially the same and they are usually should be associated with a single subscriber.  Once you find a match, you can use the "ParentObjectId" value associated with the DTMF access ID to look for a matching owner in the "GlobalSubscriber" table.  The ParentObjectId should match the SubscriberObjectId for a subscriber (assuming the DTMF access ID is assigned to a subscriber).  This is the same thing as looking at SQL; however, you are not directly accessing the DB so this is generally considered the safest way to browse and get a feel for where things are.
    Hailey

  • Is this an error? IWSSessionManager: Maximum number of sessions is 1000

    Hi,
    When this line appear in the error log of Iplanet 6 or Sun ONE 6.1... Is this an error?
    IWSSessionManager: Maximum number of sessions is 1000
    on what situation does this usually appear? (i.e. startup) ?
    thanks

    This is an "info" message and normally is seen upon startup. If you run out of sessions you should see something like follows:
    "IWSSessionManager: cannot create a new session as the limit on maximum number of sessions has already been reached: (1000)"
    Thanks
    Manish

  • HT4436 when i want to set up icloud on my iphone, it tells "can not sign in maximum number of free acounts have been activated on this iphone" what can i do now?!

    when i want to set up icloud on my iphone, it tells "can not sign in maximum number of free acounts have been activated on this iphone" what can i do now?!

    You won't be able to create a new iCloud account on your phone as the maximum number of accouts have already been created.  Your only options are to either re-use one of the accounts previously created or create a new account to use on a different iOS device or Mac (running OS X 10.7.2 or higher), if you have one.

  • Maximum Number of Items has been reached in FI

    Hi All
    We are working on MySAP ERP 2005.
    We received the following error massage:
    [Maximum number of items has been reached] we then updated table TTPYV using MATNR,MEINS,MENGE,PAOBJNR,POSN2,VBEL2,WERKS,ZEKKN 
    We had these same settings in R/3 4.7 and it worked very well.
    1. What are MySAP ERP 2005 requirements in order to get SD billing items summarized in FI? our client wants one invoice with more than 10000 items
    2. What are other IMG settings required in both FI/SD modules to get this working?
    3. Are there any User Exits required?
    4. Are there any CO settings required?
    5. Are there any G/L account settings required?
    Please assist
    Regards,
    Mutali

    I don't think you can. We had the same problem and had a good look at sap notes and posts from SDN etc. and came to the conclusion that you can only invoice up to 9999 items. Not entirely sure about that number, might be 999 items. In any case we decided to break down the billing list by creating more than one billing documents.
    You can do the same and then create an Invoice list, which is a document that will contain the values of all individual billing documents without posting any values to FI/CO

  • SG300 Cannot add IPv6 address on the interface- the maximum number of addresses 3 has already been used.

    First I ran into this brick wall on the number of IPv6 interfaces
    SG300 Cannot enable IPv6 on the interface - the maximum number of interfaces 3 has already been used.
    Also, it appears that there is no IPV6 routing in Layer 3 mode
    SG300 L3 IPv6 routing does NOT work
    And now this, I cant use more than 3 IPv6 addresses

    Good Article 
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer" Regards Edwin Anthony Joseph

  • Operation Start failed on step Allocate elastic IPs with message: Error creating static IPs; AMAZON: The maximum number of addresses has been reached.

    Hi All,
    I was trying to create Instance for SAP Application Server ABAP 7.4 SP5 incl. Business Warehouse on SAP HANA 1.0 SP7 [Developer Edition] in SAP HANA Enterprise Cloud / Cloud Appliance Library when I got this message 'Operation Start failed on step Allocate elastic IPs with message: Error creating static IPs; AMASON: The maximum number of addresses has been reached'.
    I tried looking for an answer or solution for this issue but no success.
    Can anyone please help me with this?
    Regards,
    Deep Tanwar

    Hi Deep,
    you need to check your Elastic IP limits within the AWS console and how to release them if they are used:
    Elastic IP Addresses (EIP) - Amazon Elastic Compute Cloud
    AWS Service Limits - Amazon Web Services
    Regards,
      Hannes

  • "External BP number has already been assigned"

    Execution of t-code BP, results in the following error for each vendor and customer with the same "external" number .
    External BP number 100000 has already been
    assigned for business partner 0000000045
    Display this message for this business partner
    again? 
    If No is selected, the error will still display as soon as the transaction is run again for each BP (200 duplicates = 200 error messages to click through prior to displaying the business partners), as well as each time a "duplicate" business partner is selected.
    Therefore, other than the issue outlined above, please indicate any other issues that will arise from having the same customer and vendor number range defined in ECC, and note that 30,000 existing vendors and 3,000 existing customers exist for this client.

    Hello David,
    This usually happens, when in the feeder system some customers and vendors have the same number, so this are only seemingly duplicates. The message is not really an error message, it does not prevent you from doing anything, it is only an info message, but a fairly superfluous one. If it really disturbs you, open an OSS message and ask SAP for a correction
    BR Martin

  • Document number in company code and fiscal year has already been

    Hello,
    While doing a PGI of a delivery in VL02N transaction, I am receiving a dump with the above message in the subject.
    Short text of error message:
    Document number 6200 4900000020 2010 was already assigned
    Long text of error message:
    Diagnosis
         Document number 4900000020 in company code 6200 and fiscal year
         2010 has already been assigned.
    System Response
         Termination of processing.
    Procedure
         Check document number range 49 in company code 6200 and fiscal year
         2010 and correct the number range status if necessary.
    I am not sure of the way the number range clearing in SM56. I need to know the object and subobject for the delivery number for the same.
    Does anybody knows about it ?

    What would be the object and subobject for a delivery number entered in VL02N transaction ?
    There are many objects present in VL02N transaction but I am not able to figure out the real one which is needed.
    Please help me with the same.

  • Document number 1700000000  has already been assigned

    Dear all
    I create a credit memos but when I post I receive message "Document number 1700000000 in company code HDQC and fiscal year 2008 has already been assigned"
    I checked in IMG define number range but I don't know where to assign number range to document type
    Anyone tell me why I meet this error and how to fix it
    Thank in advance
    Minh

    Use Transaction code OBA7 to go to Change view Document Types.
    Select and double click on Relevant Document Type
    Assign Number Range
    You can also view number range information from this screen to check number ranges.

  • The maximum number of instances has been exceeded

    Hi,
    I my PROD environment i am getting this type of exception.
    Instance Cache: Opening the cache for process '/ProcessName#Default-1.0'. The maximum number of instances has been exceeded.
    any suggestion ?
    Thanks,
    Brijesh Kumar Singh

    Hi Brijesh,
    Please post the Complete StackTrace. When are you getting this exception...means which operation are u performing?
    Are u in a Clustered Environment?
    Which version of WLS are u using?
    by anychance Are you getting the following Oracle Error Code in your Server Logs anywhere: ORA-00020 ?
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

  • Maximum number of Sessions ever reached in the last two days

    DB version:11gR1
    We are studying the number of sessions created by one of our JAVA oltp application. We would like to know the maximum number of sessions reached in the last two days.
    I can see max_utilization column from the query
    select * from v$resource_limit where resource_name='processes'But i don't know the time interval (no of days) on which this value is based upon.

    Hi,
    One alternate option will be noting the value before you start the experiment using following statement.
    select value from v$sysstat where name = 'user calls';
    And running this SQL after you are done with making calls. Then you can subtract the two values to get the users calls made between the two times. Keep in mind that this will include all calls made to the database.
    Regards

  • How can i access to iCloud to my iphone because it appear to the screen of my iPhone when i try to access my iCloud that the maximum number of free account have been use already please help me

    how can i access to iCloud to my iphone because it appear to the screen of my iPhone when i try to access my iCloud that the maximum number of free account have been use already please help me

    Welcome to the Apple community.
    Once three iCloud accounts have been created on any iOS device, it can you no longer be used to create any more accounts, regardless of what you do to it. You will need to use a computer or another iOS device to create your account and then use the details to log into your account on your phone.

  • SRM 5.00 web Maximum number of sessions reached

    hello
    it seems a problem very simple anyway i don't know how to resolve it.
    the error "Maximum number of sessions reached" occurs in the ITS of SRM 5.00 using the web.
    It happens on all transactionsn anyway it works properly in abap gui but not in webgui.
    If I go in all transactions and i try to open another mode the popup appears with the error descrpted.
    the session with that user are very few ...anyway the number of sessions is smaller than the parameter limit set in rdisp/max_alt_modes
    Do you have any idea?
    thanks
    Nick

    Hello Nick,
    Nicola Blasi wrote:
    If I go in all transactions and i try to open another mode the popup appears with the error descrpted.
    I do not understand what you mean by "all transactions" and "open another mode". Where do you open it? You can not open another mode from the SAP GUI for HTML (Webgui) itself, since this is not supported. You will need to start a new session.
    Best regards,
      TJ

Maybe you are looking for

  • FM to find previous date

    Hi,    I have a need in HR, is there any function module which will return me a previous day for a given date Ex,      If i entered 1st Aug 06, it should return 31st july 06 or      if i entered 1st jan 2007, it should return 31st dec 06. Thanks Kart

  • PSE 9 does not come with Camera Raw 6.2?

    Photosho Elements 9 does not come with camera raw 6.2 , I downloaded the trial version which came with an outdated 6.1... the only version of 6.2 is for PSE8 and does not work with PSE9 how is this possible? How can they release a product with an out

  • IPad music not showing artist

    New iPad 4, with match set up, only displays 5 artists and a small number of albums, yet shows all of my songs... Anyone know what I'm missing here?

  • Project template-List boxes(Public sector,Work in Process,Template)

    Project template-List boxes(Public sector,Work in Process,Template) What is the functionality of these 3 list boxes???plzzzzzzzzzzz help?? if at all i enable where i can get find it in the reporting??which reports?? Once the project is created can v

  • Automatic Executiion Of S Procedures during different intervals of day.

    Hi Folks, I need to execute a stored procedure at a fixed interval in a day daily automatically. for example everyday at (6:00 am,10:00am,2:00pm,6:00pm,10:00pm). What is the procedure to get this started in Oracle. I am sure this is possible in Oracl