Professional Communication
Software Development Tools

OPC Foundation member and certified logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions or issues. You do not have to own a commercial license in order to use the OPC Labs support. Our team is actively monitoring the forums, and provides replies as soon as possible.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible.

Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

OPCUA: Frequent connection drops

More
06 Oct 2026 07:22 #14715 by support
Hello.

Setting the KeepAliveInterval should be possible using the approach described here:  kb.opclabs.com/Intrinsic_Component_Configuration#Example:_Us...he_JSON_configuration_provider .

Unfortunately the other parameters I plan to tweak are currently not configurable in any way.

The session keep-alives are also just Read-s, so they would be a ReadRequest and ReadResponse in WireShark. I have no reliable way to distinguish them from your own Read-s from just the pictures, I need to analyze the contents of the messages. I do not understand why you are sending me the Wireshark screenshots. Simply do File -> Save in Wireshark and send me the whole capture.

Best regards
 

Please Log in or Create an account to join the conversation.

More
05 Oct 2026 15:11 #14714 by Andriy
Hello,
Could you please clarify how I can identify the "keep alive request" in Wireshark trace?
Wireshark trace captures all traffic on the OPC UA server port only. Is there a specific OPC UA message or request type that I should look for?
Also, is there a way to set the
Code:
KeepAliveInterval
as a default value through
Code:
appsettings.json?
I always use isolated connection for the opcua client
Code:
. 
The archive contains screenshots from Wireshark trace when
Code:
KeepAliveInterval
was set to its default value 5sec
 

File Attachment:

File Name: Wireshark-...PCUA.zip
File Size:957 KB
  • Please Log in or Create an account to join the conversation.

    More
    04 Oct 2026 08:12 #14710 by support
    Hello.

    I have looked deeper to this. As a result, previous hypotheses are dropped.

    Unfortunately, the Wireshark trace you provided does not provide enough information for me to continue. The session keep-alive functionality is achieved by periodic Reads - and then checking whether the server has responded in time. I will need to see the communication long enough before the problem happens (when keep-alive is set to 1 minute, then several minutes - so that both the succeeded checks, and the final failed check, are covered). If the problem appears with shorter keep-alive interval too, for the purpose of the analysis it would be fine to make it short again (and let me know what the setting was), so that a shorter Wireshark trace is needed..

    Current hypothesis is that the server might be working generally fine, but the check on the client side is too stringent. It generally only allows for 1 second above the configured keep-alive interval, before it declares a problem. You currently cannot set it from your code, but if we conclude that this is the problem, we will find a solution for you. But first I need to have the longer Wireshark communication in order to confirm or reject the hypothesis.

    Regards
     

    Please Log in or Create an account to join the conversation.

    More
    01 Oct 2026 07:19 #14708 by support
    Hello,

    I will try to reproduce some of this. There are two weird things:
    - It almost looks like that your HoldPeriod setting was ignored and it stayd and 5 seconds. I need to verify whether it is properly interpreted.
    - If the disconnection was a regular one (for HoldPeriod - even if that was with incorrect time), it should not be followed by keep alive errors - but it looks like that it is happening. Need to recheck this.

    I will report here when I have more information.

    Regards
     

    Please Log in or Create an account to join the conversation.

    More
    29 Sep 2026 09:39 #14705 by Andriy
    Correction to my previous post: we are using polling, not subscriptions

    Please Log in or Create an account to join the conversation.

    More
    29 Sep 2026 09:36 #14704 by Andriy
    Hello, sorry for the delayed reply.
    1. Yes, we are subscribed to several tags. The subscriptions are active during the connection.
    2. Please disregard my previous statement "We have not had this issue before." We recently changed our logic for detecting loss of communication. Now we rely on Disconnected/Connected events from QuickOPC directly.
    3. Here is the Wireshark capture and corresponding log records for this period. Note: log timestamps are UTC+2, while Wireshark shows UTC

    Current session parameters applied:
    sessionParameters.HoldPeriod = 60 * 1000;        // 60 seconds (default: 5 seconds)
    sessionParameters.KeepAliveInterval = 60 * 1000; // 60 seconds (default: 5 seconds)
    sessionParameters.SessionTimeout = 5 * 60 * 1000; // 5 minutes (default: 1 minute)

    Log records:
    Code:
    2026-09-29 09:19:40.308 +02:00 [Information] [] Changing connection state of OPC UA endpoint "opc.tcp://10.121.1.5:54840/" to 'Disconnecting' 2026-09-29 09:19:40.308 +02:00 [Error] [] Error reported for OPC UA endpoint "opc.tcp://10.121.1.5:54840/". ConnectionState: Disconnecting. Error: "Opc.UA.ServiceResult=0x80310000" "OPC UA service result - {BadNoCommunication}. Server not responding to keep alive requests. + Some possible causes of this error are that the OPC-UA server is not running, or is not configured to listen on the specified port. Also, the network connection may be broken (cable unplugged?). + The client method called (or event/callback invoked) was 'ServerConditionChanged'." OpcLabs.EasyOpc.UA.UAServiceException: OPC UA service result - {BadNoCommunication}. Server not responding to keep alive requests. + Some possible causes of this error are that the OPC-UA server is not running, or is not configured to listen on the specified port. Also, the network connection may be broken (cable unplugged?). + The client method called (or event/callback invoked) was 'ServerConditionChanged'. 2026-09-29 09:19:41.395 +02:00 [Information] [] Changing connection state of OPC UA endpoint "opc.tcp://10.121.1.5:54840/" to 'Disconnected' 2026-09-29 09:19:42.248 +02:00 [Information] [] Changing connection state of OPC UA endpoint "opc.tcp://10.121.1.5:54840/" to 'Connecting'
    Wireshark:
     
    Could you clarify what message type constitutes a "keep alive request"?

    4. I cannot confirm whether CPU was high at that moment or if there were network issues. Based on the Wireshark trace, there are no visible network problems.

    Looking at the Wireshark trace, there is approximately 5 sec gap between the last ReadResponse (07:19:35) and the CloseSessionRequest (07:19:40). Is there another timeout parameter we should be adjusting?

    Best regards
  • Please Log in or Create an account to join the conversation.

    More
    24 Sep 2026 16:03 #14700 by support
    Hello,

    some questions:

    1) Case 1: Are you subscribed to something? Because if not, then disconnecting after HoldPeriod is the behavior by design.

    2) Case 2: When you say "We have not had this issue before", what do you mean by "before"? Are you referring to a different QuickOPC  version, or is there anything else that has changed, or did it just start appearing without any change in the system you are aware of?

    3) Case 2: The error says "{BadNoCommunication}. Server not responding to keep alive requests.". Therefore the first thing to is to check whether the server is responding to keep alive requests. We will need a WireShark log of the communication, and the corresponding log from the QuickOPC application, with timestamps attempting to correlate the two.

    4) Case 2: Do you know if there is a high CPU load on the client or on the server, or the network is congested?

    It would be also worth to set higher value to KeepAliveInterval in session parameters.

    Regards
     

    Please Log in or Create an account to join the conversation.

    More
    24 Sep 2026 13:59 #14698 by Andriy
    Hello,
    Environment:
    .NET Version: 10
    QuickOPC Version: 5.84.374
    OPC UA Server: custom implementation
    We are experiencing intermittent communication interruptions with OPCUA servers.

    Case 1: unexplained disconnected event
    The Disconnected event fires without any apparent cause. Shortly after, communication is restored. This issue can be reproduced by delaying the data response from the OPC UA server for 5-6 seconds.
    Workaround: Setting HoldPeriod to a large value mitigates this issue.

    Case 2: BadNoCommunication Keep-Alive Failures
    On a separate server, we experience frequent disconnections with the following error:
    Code:
    Error reported for OPC UA endpoint "opc.tcp://zzzz:62541". ConnectionState: Disconnecting. Error: "Opc.UA.ServiceResult=0x80310000" "OPC UA service result - {BadNoCommunication}. Server not responding to keep alive requests. + Some possible causes of this error are that the OPC-UA server is not running, or is not configured to listen on the specified port. Also, the network connection may be broken (cable unplugged?). + The client method called (or event/callback invoked) was 'ServerConditionChanged'." OpcLabs.EasyOpc.UA.UAServiceException: OPC UA service result - {BadNoCommunication}. Server not responding to keep alive requests. + Some possible causes of this error are that the OPC-UA server is not running, or is not configured to listen on the specified port. Also, the network connection may be broken (cable unplugged?). + The client method called (or event/callback invoked) was 'ServerConditionChanged'.
    We have not had this issue before

    Please Log in or Create an account to join the conversation.

    Moderators: support, vaclav.zaloudek
    Time to create page: 0.146 seconds