Jco Adapter汇集性能死锁?

问题描述 投票:1回答:2

我们正在运行企业级SAP应用程序,前端springboot客户端使用连接池(大小为100)通过Oracle VM上的Jco适配器3.0连接。我们遇到了在SAP应用程序服务器日志中看不到的非系统长期运行请求> 10s,即瓶颈似乎不在SAP端。

查看示例请求的跟踪文件(级别4),我们可以看到,当适配器线程尝试从池中获取客户端时,时间似乎丢失(其他线程继续执行,为清晰起见,删除了不相关的线程):

[20:05:50:259]: [JCoAPI] JCoContext.isStateful(P-foo-CPIC0) in session ID Client-53-1 returns false
[20:05:50:259]: [JCoAPI] JCoContext.begin(P-foo-CPIC0) in session ID Client-53-1
[20:05:50:259]: [JCoAPI] Started context for session Client-53-1
[20:05:50:259]: [JCoAPI] JCoContext.begin() for destination PFOO_200 (P-foo-CPIC0) on context with id Client-53-1; current state counter is 1
[20:05:50:259]: [JCoAPI] destination PFOO_200 destinationID=P-foo-CPIC0 executes Z_foo sessionID=Client-53-1, threadID=0x35
[20:05:50:259]: [JCoAPI] Context.getConnection on destination PFOO_200 (state: destination = STATEFUL, default = STATELESS)
[20:05:50:259]: [JCoAPI] PoolingFactory.getClient() on pool P-foo-CPIC0
--> time lost here
[20:06:20:840]: [JCoAPI] PoolingFactory.getClient() returns handle [3/84977415]
[20:06:20:840]: [JCoAPI] Context.getConnection on destination PFOO_200 nothing found in the context - got client from ConnectionManager [3/84977415]
[20:06:20:840]: [JCoAPI] JCoClient before execute(Z_foo) on handle [3/84977415]
[20:06:20:840]: [JCoRFC] Executing function Z_foo on handle [3/84977415]
[20:06:20:866]: [JCoAPI] JCoClient after execute(Z_foo) on handle [3/84977415] returns after 26 ms
[20:06:20:866]: [JCoAPI] Context.releaseConnection on destination PFOO_200 [3/84977415]
[20:06:20:867]: [JCoAPI] JCoContext.end(P-foo-CPIC0) in session ID Client-53-1
[20:06:20:867]: [JCoAPI] PoolingFactory.releaseClient() handle [3/84977415] into pool P-foo-CPIC0 [pool size: 3, peak limit: 100, waiting threads: 0, currently used: 1]
[20:06:20:879]: [JCoAPI] Finished context for session Client-53-1
[20:06:20:879]: [JCoAPI] JCoContext.end() for destination PFOO_200 (P-foo-CPIC0) on context with id Client-53-1; current state counter is 0

对于典型请求,步骤以毫秒为单位处理。

对适配器或SAP端的Jco适配器的池处理有任何已知限制或配置吗?

更新我们在Jco适配器3.0.16上,现在将仔细检查3.0.17。 DNS似乎不太可能,因为我们正在监控dig / nslookup并且它们正在运行而没有延迟。

spring-boot sap rfc jco
2个回答
2
投票

您使用哪个JCo补丁级别?您是否尝试先更新到最新的JCo补丁级别3.0.17?

在您的时间间隔中,如果池在那时为空,则将打开RFC连接并完成RFC登录。您是否仔细查看了更高的跟踪级别,或者您是否了解了RFC跟踪?

这可以是ABAP方面没有免费对话工作流程,SAP系统数据库问题(RFC登录认证检查所需),SAP消息服务器响应时间慢(如果使用负载平衡登录),SNC握手问题(如果使用SNC)或DNS的一般网络问题(尝试使用IP地址而不是主机名)。


0
投票

值得检查的另一点:你说你的连接池有100个大小。你的程序有超过100个线程吗?然后可能会不时地发生所有连接当前在其他线程中忙,并且当前线程必须等到另一个线程中的函数调用完成并且连接返回到池。 (可以通过“池等待时间”参数自定义线程在空池上等待的时间。)

© www.soinside.com 2019 - 2024. All rights reserved.