OPCFoundation / UA-.NETStandard-Samples

Other
244 stars 179 forks source link

OPC Wrapper goes into a bad state(BadTooManyOperations) when left running for long. #592

Open vinaybr opened 4 months ago

vinaybr commented 4 months ago

Type of issue

Current Behavior

OPC Wrapper goes into a bad state(BadTooManyOperations) when left running for long.

Steps To Reproduce

We are running the wrapper sample with a HDA server. We are reading about 20 nodes at regular intervals and when left to run over for long goes into a bad state. The History Read starts failing with BadTooManyOperations. Once this happens the server fails with the same error when another client tries to connect to the server. Disconnecting the HDA client also does not help. The only way to recover is to restart the Wrapper.

Environment

- OS: Windows 10
- Environment: 64bit
- Runtime: .Net6
- Nuget Version:1.4.370.12
- Component:Wrapper
- Server:
- Client:
mregen commented 4 months ago

@vinaybr this error (BadTooManyOperations) is hit when the server local thread pool which processes the service requests runs out of threads, which means there might be threads consumed and waiting which never return, or too few threads are configured. How long does it take until it goes to a bad state? Please check also the latest Nuget bits, this error was changed to return BadServerTooBusy.

To change the max number of threads in use, here are the settings:

    <MinRequestThreadCount>5</MinRequestThreadCount>
    <MaxRequestThreadCount>100</MaxRequestThreadCount>
    <MaxQueuedRequestCount>2000</MaxQueuedRequestCount>

Please provide also some log output.