Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][OPC-UA]: org.apache.plc4x.java.api.exceptions.PlcProtocolException: Server returned error BadTooManySessions (0x80560000) #1589

Closed
2 of 16 tasks
ShawnKion opened this issue May 7, 2024 · 3 comments
Assignees
Labels
bug java Pull requests that update Java code OPC-UA https://plc4x.apache.org/users/protocols/opcua.html

Comments

@ShawnKion
Copy link

What happened?

When I tried to read some nodes multiple times, the issue of too many sessions occurred.
I'm wondering if there is a configuration file that I can set some values to limit the max session I need?

Version

0.12.0

Programming Languages

  • plc4j
  • plc4go
  • plc4c
  • plc4net

Protocols

  • AB-Ethernet
  • ADS /AMS
  • BACnet/IP
  • CANopen
  • DeltaV
  • DF1
  • EtherNet/IP
  • Firmata
  • KNXnet/IP
  • Modbus
  • OPC-UA
  • S7
@ShawnKion ShawnKion added the bug label May 7, 2024
@ottlukas ottlukas added the java Pull requests that update Java code label May 15, 2024
@splatch splatch self-assigned this May 24, 2024
@splatch
Copy link
Contributor

splatch commented May 24, 2024

Hello @ShawnKion,
Can you share some more information - how do you scrap PLC, how long it does take to get this error, and how many threads you use in your application?

Strictly speaking it is runtime issue, so we have to look closer at how you read data and, probably, what are server settings.

@chrisdutz chrisdutz changed the title [Bug]: org.apache.plc4x.java.api.exceptions.PlcProtocolException: Server returned error BadTooManySessions (0x80560000) [Bug][OPC-UA]: org.apache.plc4x.java.api.exceptions.PlcProtocolException: Server returned error BadTooManySessions (0x80560000) Jun 30, 2024
@splatch splatch added driver-opc-ua OPC-UA https://plc4x.apache.org/users/protocols/opcua.html and removed driver-opc-ua labels Jul 4, 2024
@qtvbwfn
Copy link
Contributor

qtvbwfn commented Aug 10, 2024

@ShawnKion
The OPCUA SERVER limits the number of connection sessions, so make sure you haven't established too many connections. You also need to check the OPCUA SERVER's limitations regarding connections.

@splatch
Copy link
Contributor

splatch commented Oct 22, 2024

This issue is most likely environment specific. Make sure that you 1) open few connections to PLC 2) construct application logic independently of connection 3) manage number of opened connections according to hardware manufacturer limits.

I am closing it for now - please re-open it if you will be able to provide more details or suspect bug in driver itself. You can try running extra diagnostics to see if your app is able to keep connection active for long time.

@splatch splatch closed this as completed Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug java Pull requests that update Java code OPC-UA https://plc4x.apache.org/users/protocols/opcua.html
Projects
None yet
Development

No branches or pull requests

4 participants