locked
SignalR web applications Working processes problem in IIS 7.5 RRS feed

  • Question

  • User530990395 posted

    Hi everyone.

    In my company we have many web applications on a web server. Recently we developed a Chat module to this applications using SignalR. But a strange problem occured on these applications. In time this apps becomes unreachable. Recycleing does not solve. When i try to restart application pools it stops an never starts again. I had create a new app pool and delete the old one. And some time later the problem recurs.

    Then i noticed that these application pools have several working processes which have the state of "Closing" and one "Running". What can be the problem? It is about SignalR I know, becouse this problem occurs only the applications which i use SignalR and we have about fifty apps on the server in total and only four of them have signalR on it.

    Thanks for help..

    ps: i previously write the iis version mistakenly as 6.1 but now i have changed it to the correct version. 

    Tuesday, November 29, 2016 12:23 PM

All replies

  • User283571144 posted

    Hi Osmankoc,

    Then i noticed that these application pools have several working processes which have the state of "Closing" and one "Running". What can be the problem? It is about SignalR I know, becouse this problem occurs only the applications which i use SignalR and we have about fifty apps on the server in total and only four of them have signalR on it.

    As far as I know, when SignalR is hosted in IIS, the IIS version must be 7 or later.

    From SignalR Supported Platforms:

    When SignalR is hosted in IIS, the following versions are supported. Note that if a client operating system is used, such as for development (Windows 8 or Windows 7), full versions of IIS or Cassini should not be used, since there will be a limit of 10 simultaneous connections imposed, which will be reached very quickly since connections are transient, frequently re-established, and are not disposed immediately upon no longer being used. IIS Express should be used on client operating systems.

    Also note that for SignalR to use WebSocket, IIS 8 or IIS 8 Express must be used, the server must be using Windows 8, Windows Server 2012, or later, and WebSocket must be enabled in IIS. For information on how to enable WebSocket in IIS, see IIS 8.0 WebSocket Protocol Support.

    • IIS 8 or IIS 8 Express.
    • IIS 7 and 7.5. Support for extensionless URLs is required.
    • IIS must be running in integrated mode; classic mode is not supported. Message delays of up to 30 seconds may be experienced if IIS is run in classic mode using the Server-Sent Events transport.
    • The hosting application must be running in full trust mode.

    More details, you could refer to follow link:

    https://www.asp.net/signalr/overview/getting-started/supported-platforms

    Best Regards,

    Brando

    Wednesday, November 30, 2016 5:36 AM
  • User530990395 posted

    As far as I know, when SignalR is hosted in IIS, the IIS version must be 7 or later.

    Thank you Brando. Sorry my bad... That i typed the version of IIS wrongly. That was a very stressed moment of mine. The correct version of IIS is 7.5 Don't know how to correct the thread.

    Now i am examining your other comments.

    Wednesday, November 30, 2016 12:47 PM
  • User530990395 posted

    Hello Again,

    I installed the web applications on a iis 8 machine and result is the same. unfortunately "closing" state processes still exist.

    any other help?

    Thursday, December 8, 2016 12:28 PM
  • User283571144 posted

    Hi Osmankoc,

    Then i noticed that these application pools have several working processes which have the state of "Closing" and one "Running". What can be the problem?

    As far as I know, after you have recyled the applicaiton pool, the old process will still run until its shutdown timeout limit.

    The default value is 90 seconds.

    So you will face several working processes which have the state of "Closing" and one "Running".

    In time this apps becomes unreachable.

    Could you please post more relevant inforamtion about unreachable?

    Does it show any error message?

    If you could post more relevant information, it will be more easily for us to reproduce your error and find the solution.

    In my computer, I use visual studio 2015 web deploy to publish a signlar chart to my IIS, it wors well,

    Best Regards,

    Brando

    Monday, December 12, 2016 9:54 AM
  • User530990395 posted

    Hi Brando,

    That'is not a 90 second periyot. in fact, i see one day two processes, a week later the number of processes that has stoping state can be ten or more. some time later, the memory of server can be overloaded. i had to kill this extra processes from command line using "taskkill /f".

    unreachable situtation sometimes occurs. it's on the browser. it remains loading. but it never loads. a white screen, you and the browser's loading icon. that's all we have :(

    Monday, December 12, 2016 10:45 AM
  • Monday, December 12, 2016 11:01 AM
  • User530990395 posted

    Hi Navneet,

    i read the articles but i couldn't get the point. I'm really very confused about this :(

    Monday, December 12, 2016 1:43 PM
  • User-1768369891 posted

    Osmankoc

    i read the articles but i couldn't get the point. I'm really very confused about this :(

    A PersistentConnection is the base class that has an api for exposing a SignalR service over http.

    To create a new endpoint. Create a new class that derives from PersistentConnection.

    To make this endpoint accessible, add a route to Application_Start (or something similar):

    If already applied this then you can check your host is reachable or not locally,

    may be your hosted application port used by another service it caused the issue it not an issue in SignalR because it working fine if your host is working.  

    1.Update the latest from nuget Signalr.

    2.Update the Web Page that Uses SignalR.

    Check below mentioned link for more info.It has explained steps for how to do that.

    Hosting a SignalR application on Windows 2008r2 and IIS 7.5

    UPDATE

    According to the OP's feedback you can fix this by installing below mentioned Update for IIS.

    A update is available that enables certain IIS 7.0 or IIS 7.5 handlers to handle requests whose URLs do not end with a period

    I hope this will help to you.

    Tuesday, December 13, 2016 4:27 AM
  • User530990395 posted

    Hi,

    I use Microsoft.AspNet.SignalR.Hub class for the signalR apllication. Should i change it as PersistentConnection?

    I check the framework versions and the OS update status. Last version framework is installed. SignalR is already last version.

    In addition, when i try to install the hotfix, i get "not applicable" error. I think it is becaouse sp1 is already installed.

    The website is reachable from internet. But there are two applications which uses signalr. Can this be a problem?

    Today i checked the processes, i see this :(

    Tuesday, December 13, 2016 2:50 PM
  • User-1768369891 posted

    I think two application run on signalr is not an issue... 

    Try these settings may be help you.. 

    Shutting down of worker process after 20 minutes of inactivity is the default behaviour of IIS Application Pool.

    You can set Idle Time-out to 0 in the advanced settings of the Application Pool.

    http://stackoverflow.com/questions/28683940/signalr-stops-working-after-a-while

    https://www.asp.net/signalr/overview/testing-and-debugging/troubleshooting

    http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx

    Wednesday, December 14, 2016 5:33 AM
  • User530990395 posted

    Hi again Navneet

    Unfortunately my problem continues. I set the Idle Time-out value to 0, as you recommended. Then I killed the all processes and restarted the app pool. But this morning, this is the situtation again;

    Any other suggestions?

    Monday, December 19, 2016 10:53 AM
  • User1324658857 posted

    Hi,

    I think there are something wrong with your IIS config.

    I suggest you could post the same thread to IIS forum,

    https://forums.iis.net/

    Monday, December 26, 2016 2:11 PM
  • User530990395 posted

    Thanks a lot.

    I started a new thread on iis forums.

    https://forums.iis.net/p/1234817/2128313.aspx?p=True&t=636183304629997582

    Monday, December 26, 2016 2:29 PM