Loadbalancing

Last post 04-18-2011, 11:41 AM by f.cipriani. 16 replies.
Sort Posts: Previous Next
  •  04-02-2008, 3:14 PM 38581

    Loadbalancing

    Hi, I'm setting up cutechat with two load balanced NLB cluster nodes and a single database/web server in single process mode. I've followed the instructions in the developers manual and set up the CuteChat.NLB settings in <appsettings> and set MultipleServerMode to true on the client and the server but I'm getting the error
     
    Unable to get portal instance because current application is not cutechat server
     
    I have integrated cutechat with our membership database using a custom Global.asax, and all was working on a standalone server.
     
    Any ideas?

  •  05-05-2008, 4:40 AM 40035 in reply to 38581

    Re: Loadbalancing

    We've got the same problem, did you manage to find a solution?
  •  06-05-2008, 11:34 AM 41171 in reply to 40042

    Re: Loadbalancing

     

    Hello Karen.

    I read your answer to Mr Cipriani, my job-colleague,

    and I tryed to test UnicuteChat in an isolated environment described as follow:

    *****************************************************

    **** UnicuteChat Server Side installation and configuration ****

    *****************************************************

    - Server name “unicutechatsrv”

    - Windows 2003 Server, Enterprise Edition, Service Pack 2, English Language

    - IIS, version 6.0

    - Asp.net, version 2.0.50727

    - UniCuteChat-WebApplication, version 4.1, installed as follow:

     on a virtual dir named "UniCuteChat",

     with dedicated application pool named "UniCuteChatPool" wich has assigned only UniCuteChat-WebApplication,

     in a web site named "UniCuteChatWebSite" containing only "UniCuteChat" virtual dir.

                     

    - UniCuteChat-WebApplication, version 4.1, configured as follow (“web.config” file content):

    <?xml version="1.0"?>

    <configuration>

    <appSettings>

                                   <add key="ConnectionString" value="server=devserver;database=CuteChat4;uid=sa;pwd=cipr1an1" />

    <add key="OnlineTimeout" value="300" />

    <add key="CuteChat.NLB" value="mode=server;password=test123;" />

     </appSettings>

                    <system.web>

                                   <compilation defaultLanguage="c#" debug="true"/>

                                   <customErrors mode="Off"/>

                                   <authentication mode="Forms">

                                                   <forms name=".UserManagementASPXAUTH" loginUrl="~/Login.aspx"/>

                                   </authentication>

                                   <authorization>

                                                   <allow users="*"/>

                                   </authorization>

                                   <trace enabled="true"></trace>

                                   <sessionState mode="InProc" timeout="20"/>

                                   <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>

                    </system.web>

    </configuration>

                 

    *****************************************************

    **** UnicuteChat Client Side installation and configuration ****

    *****************************************************

    - Windows XP Professional, version 2002, Service Pack 2, Italian Language

    - IIS, version 5.1

    - Asp.net, version 2.0.50727

    - UniCuteChat-WebApplication, version 4.1, installed as follow:

     on a virtual dir named "UniCuteChat" with a protection level “media pool”,

     in a web site containing other virtual dirs.

                     

    - UniCuteChat-WebApplication, version 4.1, configured as follow (web.config file content):

    <?xml version="1.0"?>

    <configuration>

                    <appSettings>

                                   <add key="CuteChat.NLB" value="mode=client;password=test123;url=http://unicutechatsrv/unicutechat/CuteSoft_Client/CuteChat/NLBService.ashx" />

                    </appSettings>

                    <system.web>

                                   <compilation defaultLanguage="c#" debug="true"/>

                                   <customErrors mode="Off"/>

                                   <authentication mode="Forms">

                                                   <forms name=".UserManagementASPXAUTH" loginUrl="~/Login.aspx"/>

                                   </authentication>

                                   <authorization>

                                                   <allow users="*"/>

                                   </authorization>

                                   <trace enabled="true"></trace>

                                   <sessionState mode="InProc" timeout="20"/>

                                   <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>

                    </system.web>

    </configuration>

    ************************************

    **** UnicuteChat Load-Balancing Test ****

    ************************************

    In Internet Explore 7.0 of client machine we digit HTTP-URL:

    http://localhost/unicutechat/Chat.aspx

    obtaining error:

    general error message:

                    “Unable to get portal instance because current application is not cutechat server.”

     

    detailed exception-error message:

                    “System.Exception: Unable to get portal instance because current application is not cutechat server.”

     

    source-code error message in file:

    Source File:c:"Inetpub"wwwroot"UniCuteChat"chat.aspx”   

    Row Number: “55”

    Row Code: “foreach(LobbyInfo lobby in ChatApi.GetLobbyInfoArray())”

     

    *****************

    **** Questions ****

    *****************

    
    
    
    
    What do you think about the installation and configuration? Something has wrong?
    About load-balancing documentation, for server side installation, what does it mean “Deploy cute chat/messenger to the server which is running in single-process mode”? 
     
    Regards,
    Angelo
     
  •  06-13-2008, 4:03 AM 41384 in reply to 41178

    Re: Loadbalancing

    Yes.
     
    If I digit the following URL in browser:
     
    I can see chat home page.
     
    CuteChat work properly.





     
  •  09-30-2008, 4:36 AM 44403 in reply to 41384

    Re: Loadbalancing

    I'm get same your problem!
    so any solution from Cutesoft?
    my system : 3 web server (IIS) loadbalancing + 1 MSSQL DB server.
    I'm deploy using this manual : http://cutesoft.net/ASP.NET+Chat/Developer-Guide/scr/Load-Balancing.htm
    when i'm run NLBservice from any server i'm get error :

    Missing Header CuteChat.NLB=1
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Exception: Missing Header CuteChat.NLB=1

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:


    [Exception: Missing Header CuteChat.NLB=1]
       CuteChat.ChatNLBServiceHandler.ProcessRequest(HttpContext context) +1025
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

     


  •  10-09-2008, 10:31 PM 44757 in reply to 38581

    Re: Loadbalancing

    Hi all,
     
    the ChatApi.GetLobbyInfoArray is an obsoleted method because it's not compatible with the load balancing feature.
     
    but the Chat.aspx still use that function . We are very sorry about that , and will provide a quick update .
     
    this is for Chat.aspx "Unable to get portal instance because current application is not cutechat server" issue only.
     
    --
     
    If any one has difference issue , please contact me directly : terry @ cutesoft.net
     
    Regards , Terry .
  •  10-12-2008, 4:35 AM 44819 in reply to 44757

    Re: Loadbalancing

    Hi,
     
    Please download this Chat.aspx for CommunityServer
     
    Regards,
    Terry .
  •  10-17-2008, 6:06 AM 44957 in reply to 44757

    Re: Loadbalancing

    so, how about Grouplist.aspx ?

    I see it used :

    string GetForumChatterNames(object forumid)
        {
            string key="Forum:"+forumid;
       
            foreach(LobbyInfo info in ChatApi.GetLobbyInfoArray())
            {
                if(info.Lobby.Integration==key)
                    return info.JoinClient(",");
            }
            return "";
        }
        int GetForumChatterCount(object forumid)
        {
            string key="Forum:"+forumid;
            foreach(LobbyInfo info in ChatApi.GetLobbyInfoArray())
            {
                if(info.Lobby.Integration==key)
                    return info.ClientCount;
            }
            return 0;
        }

  •  01-24-2011, 8:26 AM 65851 in reply to 44757

    Re: Loadbalancing

    cutechat:
    Hi all,
     
    the ChatApi.GetLobbyInfoArray is an obsoleted method because it's not compatible with the load balancing feature.
     
    We are actually having huge performance issues calling this method in a load balancing configuration. The method seems to work fine until we have about 30 users, but when that number increases it starts issuing timeout errors.
     
    I tried to show the problem to the live chat support on friday, but the number of users dropped and the page where we use that method started working again.
     
    Is there any news about this subject? The patch link provided in an earlier message in this thread is not working anymore.
  •  01-24-2011, 9:03 AM 65854 in reply to 65851

    Re: Loadbalancing

    Dear f.ciprianti,
     

    This issue has been fixed in the latest version.Please open application "bin" folder, and right click "CuteChat.dll", you will find its version and build date. Can you tell us what's the build date of this file?

     
    Thank you for asking
  •  01-24-2011, 10:57 AM 65855 in reply to 65854

    Re: Loadbalancing

    The file is dated 23/02/2009, the file version is 5.0.0.0, but I can't find the build date anywhere in file properties.
  •  01-24-2011, 11:01 AM 65856 in reply to 65855

    Re: Loadbalancing

    Dear,
     
    The download url of latest version is http://cutesoft.net/downloads/13/default.aspx, the build date is Jan 20,2011.
    Please download latest version and try it again.
    Keep us posted.
     
    Thank you for asking
     
  •  03-31-2011, 3:27 AM 66934 in reply to 65856

    Re: Loadbalancing

    Hello, 
     
    Even after upgrading to the latest version, we were still having the performance issues with GetLobbyInfoArray(). We had to remove that method call from our code, thus giving up showing the information about the number of connected users in our custom page.
     
    Moreover, performance issues seems to happen also when some number of users are online (around 40-50) and new users try to connect to the chat load balancing server. 
     
    Fabrizio Cipriani 
     
     
     
     
  •  04-18-2011, 11:41 AM 67222 in reply to 66934

    Re: Loadbalancing

    To find out where the performance problem was, we have set up an web application stress testing grid and have put our version of CuteChat under heavy load.
     
    We noticed that CuteChat invokes some of the callback methods defined in SampleProvider.cs, UserData.cs and Global.asax.cs several times per second. Each of those methods makes a SQL query to fetch information about the currently logged user (his/her role, if it is available in the database, etc.). We customized this methods making them point to our database, while the default version points to the CuteChat database.
     
    As the users keep logging on to the application, the number of the SQL queries per second increases, to the point that after 40-50 users (which cause about 160-200 query per second) the Cutechat load balancing server stops responding.
     
    Knowing this, we added a simple caching algorithm in the UserData.cs and Global.Asax.cs methods which make the queries, thus boosting performance under heavy load.
     
    Fabrizio Cipriani
     
View as RSS news feed in XML