L
L
Luda2018-07-30 15:47:48
WPF
Luda, 2018-07-30 15:47:48

How to get rid of communication breaks between the desktop application and the server?

Hey! We work with WCF (Windows Communication Foundation) for client-server applications. The client is a tracker, a desktop application for tracking, processing and transferring data to the database. The service itself is hosted in a desktop application (admin) on a remote server. Both applications are written in wpf according to the mvvm template, we use devexpress.
The problem started a couple of weeks ago: requests to the server stopped coming. The tracker hung up, it was impossible to log in or make a request to the database if you were already logged in.
When attaching to the process of the Admin application, where the service is running, breakpoints did not work from the test client (but there was a situation when breakpoints worked during the test, but on requests from other clients, not the test one). When you press pause during connection problems, visual studio wrote that you are in break mode, but no code is being executed.
Added trace logs on the server (file with .svclog extension). We caught that the problem with requests to the server occurs when there are logs from several streams from a certain IP and bytes are being received (sometimes the IP changed to another, from the same region). About 10 threads process a request from this IP. And it can last from 30 minutes to an hour. Almost all of these long log requests ended in expedits (CommunicationException. I / O operation was aborted due to the completion of the command stream or at the request of the application; Attempt to perform an operation on a non-existent network connection). There were a couple of long queries that completed without errors.
We changed the following parameters in the service configuration: ConcurrencyMode, UseSynchronizationContext. It did not help.
They blocked the IP from which long requests were sent, it did not help either. Right now the only solution is to restart the Admin when a hang occurs. The mistake has been steadily spoiling life for the last two weeks. Prior to this, breaks were very rare. In the service, before the appearance of regular problems, nothing has changed for a long time.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question