-
Notifications
You must be signed in to change notification settings - Fork 446
Application crashes on azure app service with signalr alpha #905
Comments
When you get some logs, let us know. Turn up the application logs to trace. This isn't very actionable feedback at the moment. |
Do you mean the application logs inside the asp.net core app? they are currently on Information for Microsoft. the last logs i saw from the signalr was connection closed and then the application crashes and restarts (on azure). if there was any warning on error i guess i would see it (since its above information). Yosi |
Any logs you can get, crank up the default logging level to "Trace" and look at either app insights (what I recommend) or use the stdout log |
Hey @davidfowl , good news i think i got it.
once this exception is thrown the application is dead (this what caused it to crash on azure). |
@yosigolan yes that exception looks pretty deadly 😄 . Can you put your application on a github repository somewhere so we can take a look. |
sorry, its a production product, you can view it here: www.seevoov.com Yosi |
If you can provide any details on how the error can be reproduced, it would be great. Can you reproduce it on demand now only when running behind IIS locally? |
yes, i can reproduce it on demand on my machine locally using iis express. if you want we can make a conference call and i will let you debug it (you need to connect with the source).
Yosi |
I'd like to figure it out without a conference call (chat in slack might be easier to start with http://tattoocoder.com/asp-net-core-slack-community/) Based on the stack trace there's a null ref in Some things that might help:
What does this method do (at line 122)?
|
in line 122 there is this code: i am using the defaults so eventually it uses websockes. |
Do not do that. Just get it in the method every time. The constructor is too early to store anything to do with the hub.
Then something is wrong. This is what your Program.cs should look like: WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.ConfigureLogging(logging =>
{
logging.SetMinimumLevel(LogLevel.Trace);
}
.Build(); That will set the logging to trace. There's an output window in visual studio that will show everything when running on IIS Express: |
Thanks for the answer. regarding the logs, when using serilog the configuration looks different. Yosi |
The constructor is too early because none of the hub properties have been set yet. You're injecting the IHubContext into the Hub itself? If yes why?
Just make sure you add the ConfigureLogging code that sets the level to Trace. The problem is I can't decipher what your application is doing. I need to see the source code or you need to debug it more so I can get more details. It would help if you wrote the most basic idomatic hub code and see if that reproduces the issue:
After making those changes, see if the problem can be reproduced. |
Let me explain a bit, i think the naming of my classes confused you:
Yosi |
@yosigolan I see. Just do you know, I'm not trying to get you to change your code to fix things, I'm trying to narrow down the problem. There is a bug here, I'm just trying to figure out how I can reproduce the problem so I can fix it. I don't want to force you to debug the SignalR source code yourself so the goal is to narrow the things down so we can figure out what the issue is.
We need to figure out what's causing the null ref. If you never store m_Client and always resolve the client before calling the method, does it work?
Yes, this is an alpha release and there are LOTS of bugs and changes that still need to be made. If you're running it in production that's on you 😄, there is no support for this until it ships. We appreciate the feedback regardless. |
Hey. i have one more bit of information that might help: |
Why dont you take the time and create a simple app that replicates your problem without your proprietary IP in it? You are on here asking for assistance but unwilling to share code and giving generic exceptions.... Take the 15 or 20 minutes and setup a simple app to replicate the problem so that the devs here can actually help. |
its holidays here. will try shortly. Yosi |
@yosigolan any updates? |
Hey @davidfowl Yosi |
Hey. before you jump into the code, please read this: regarding the exception, i do think that an exception should be thrown but maybe more related to the problem and also if possible give an option to check if the client (with some connectionId) is connected before invoking a method on it. regarding the code that i uploaded, there are 2 folders, server and client. i used angular client but as you can understand you can use any client to reproduce it, event postman that sends wrong connection id to the post method. hope it helps, |
- Added some tests for the DefaultHubLifetimeManager #905
Thanks! |
* Check for null before sending to a specific connection id - Added some tests for the DefaultHubLifetimeManager #905
This issue should be fixed now and will appear in alpha2 |
setup:
server: asp.net core app version 2.0
signalr 1.00 alpha
client: Angular 4.3
symptom: when deploying the server to azure app service, server crashes with 2 connections (the entire app crashes and restarts).
i couldn't receive any exception or error from azure app service, just: application stopped unexpectedly.
when using the same setup only with the old signalR (i know its not certified), the app does not crash.
i think its related to the number of connections, because i see it happens when i am connecting the second client and playing a bit.
sorry i dont have too much details, i tried getting some logs from azure but haven't succeeded after few hours...
The text was updated successfully, but these errors were encountered: