question

PaulD-6267 avatar image
0 Votes"
PaulD-6267 asked ·

WCF Service ocassionally hangs and requires restart.

I have a WCF service hosted in a webapp on Azure that will stop accepting requests approximately once a month. It will not accept any requests until I restart the web app. Then it will work perfectly for a while. I am trying to nail down the issue so I can make the service run without requiring any restart. Here is what I believe. It is not a CPU or memory issue. CPU always runs very low and peeks at 48%. Memory never goes over 70%. When it hangs CPU and memory are low and stay low. When a request comes in the processing time is less than a second. The service processes about 800 requests per day. There is no time consuming code. I am not sure if I have an issue in my code that is leaving connections open and causing grief or it there is something in the web.config that looks incorrect. Any help or suggestions as to what is causing he web app to require the occasional restart would be greatly appreciated. Any suggestions where I should start looking to determine the issue would also be really appreciated. Below is my web.config. Thank you.










azure-active-directory
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

eberdev avatar image
0 Votes"
eberdev answered ·

Do you have any error logging or event logging implemented on the web app? can you integrate app insights into it? sounds like there is one thing that is borking this and its happening very infrequently. is the web app set to always on? since it seems so rare the first place i'd be looking is at request / activity logs for the times just before it stops working (i am assuming at 800 req/day you could figure out when it stops working within a span of about 30 minutes)?

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MarileeTurscak avatar image
0 Votes"
MarileeTurscak answered ·

Please share the error and event logs as eberdev mentioned.

You can implement a load balancer allowing you to open 10 connections from a single client. You can open new connections requests, or combine requests so that you can send a single request with more data rather than separate requests with less data.

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JohanLindberg-7081 avatar image
0 Votes"
JohanLindberg-7081 answered ·

PaulD-6267 Did you get anything on this?
We're seeing the same thing on some of our selfhosted WCF services.

Services that has been running all 2019 without problem now sometimes stops responding.
It started for us in 2020 February, and now we have to restart the service manually when it happens.
Which is about once every second week.

Nothing in event-logs, no exception is thrown. We're using Net.TCP on the services that fails.
The services using soap binding doesn't seem to have the problem.

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.