SAP .NET连接器在第一次尝试时需要很长时间才能获取结果 [英] SAP .NET connector takes a long time to fetch results on first attempt

查看:58
本文介绍了SAP .NET连接器在第一次尝试时需要很长时间才能获取结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SAP .NET连接器有问题

I have an issue with the SAP .NET Connector

我已经构建了一个Web应用程序(ASP.NET,C#),该应用程序连接到SAP BAPI过程以从SAP数据库中获取结果.

I have built a web application (ASP.NET, C#) that connects to SAP BAPI procedure to fetch results from SAP database.

我已将其连接到SAP BAPI过程,并且它还获取了Web应用程序的结果.

I have connected it to SAP BAPI procedure and it also fetches the results for the web application.

我的问题是,第一次尝试需要25到30秒才能获取结果,但是从第二次尝试开始,结果却没有时间获取.

My issue is, during the first attempt it takes 25 to 30 seconds to fetch the results, but from the second attempt onwards the results are fetched with no time.

我不知道为什么第一次尝试获取结果要花这么长时间.

I don't know exactly why it is taking so long to fetch the results on the first attempt.

有人可以帮我吗?

推荐答案

自此打开以来已经很长时间了,但是可以解决(如果知道要怎么做,甚至很容易).

It's been a long time since this one was opened, but it can be solved (it's even pretty easy if you know what to to).

我们遇到了同样的问题,直到建立连接为止,延迟超过10秒.在目标服务器SM21事务中,直到客户端得到答案,该连接才可见.

We've had the very same problem, above 10 seconds delay till a connection was established. Within the targeted servers SM21 transaction, the connection wasn't visible till the client got the answer.

我捕获了网络跟踪,发现它确实是网关,它占用了请求和响应之间的时间.在服务器dev_rd日志文件(网关调试日志)中(在初始延迟之后)出现了一个非常明显的条目:

I've captured a network trace and saw that it's indeed the gateway taking it's time between request and response. In the servers dev_rd log file (gateway debug log) appeared (after the initial delay) a pretty obvious entry:

Fri Aug  3 07:55:20:963 2018
NiHLGetHostName: to get [private-ip] failed in 12004ms (tl=2000ms; MT; UC)
*** ERROR => NiHLGetHostName: NiPGetHostByAddr failed (rc=-1) [nixxhl.cpp   514]

尝试通过nslookup工具获取该IP的DNS答案也失败.由于网关似乎在缓存否定命中,因此以下请求的速度更快,但是一旦条目超时,您就会再次遇到延迟.

Trying to get a DNS answer for that IP failed through the nslookup tool as well. The following requests are way faster as the gateway seems to cache the negative-hits, but as soon as the entry times out, you'll experience the delay again.

因此:

  1. 配置您的DNS服务器(使用 in-addr.arpa添加私有区域以成功进行反向查找),这样网关就不必运行在超时.
  1. Configure your DNS server (add the private zones with in-addr.arpa for successful reverse lookup), so that the gateway doesn't have to run into a timeout.

或(更糟糕的是,无论如何应该设置反向查找区域)

or (worse, as the reverse lookup zones should be set-up anyway)

  1. 遵循sap注释1055602,以通过rdisp/reverse_name_lookup参数永久停用反向查找.

这篇关于SAP .NET连接器在第一次尝试时需要很长时间才能获取结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆