我从PyRFC库中收到此错误:
Traceback (most recent call last):
...
File "/.../sap_connection.py", line 486, in get_connection
return Connection(**get_connection_dict(contact_host))
File "src/pyrfc/_pyrfc.pyx", line 182, in pyrfc._pyrfc.Connection.__init__
File "src/pyrfc/_pyrfc.pyx", line 226, in pyrfc._pyrfc.Connection._open
File "src/pyrfc/_pyrfc.pyx", line 256, in pyrfc._pyrfc.Connection._error
pyrfc._exception.CommunicationError: RFC_COMMUNICATION_FAILURE (rc=1): key=RFC_COMMUNICATION_FAILURE, message=
LOCATION CPIC (TCP/IP) on local host with Unicode
ERROR max no of 200 conversations exceeded
TIME Wed Dec 4 13:53:22 2019
RELEASE 753
COMPONENT CPIC (TCP/IP) with Unicode
VERSION 3
RC 466
MODULE /bas/753_REL/src/krn/si/cpic/r3cpic.c
LINE 15830
COUNTER 201
[MSG: class=, type=, number=, v1-4:=;;;]
到目前为止,我创建了很多 Connection 实例并且从未明确关闭它们。
如果 Python 进程再次启动(通过 linux cron 作业),则 RFC 调用工作正常。
我应该怎么办:
- 明确关闭连接?
- 重用连接?
- 别的东西?