英文:
Azure Database database is slow when locally debugging in VS 2022
问题
我正在与我的团队解决一个问题,我们正在使用Azure SQL数据库作为服务。
在一个示例中:
- 通过Azure应用服务连接到Azure数据库:调用需要350毫秒
- 通过我们工作计算机上的VS 2022连接到Azure数据库:调用需要2.5秒
- 在我们工作计算机上本地连接到bacpac数据库(来自Azure数据库):调用需要350毫秒
我们已经做了以下事情:
- 将定价层从弹性池更改为标准S2:50个DTU -> 仍然存在相同的缓慢
- 更改Azure数据库的位置
- 优化了一些调用(有帮助,但本地数据库和Azure数据库之间仍然存在很大差异)
我们认为这可能与我们向服务器发出的整体特定调用有关,我们正在为每个调用对数据库进行X次调用并打开连接?
仍然不清楚为什么在本地工作得如此快,但是在开发时连接到Azure数据库时如此缓慢。
此外,似乎这曾经不是问题。我们认为可能是我们工作VPN的更改引起了问题,但是我们已经在VPN上进行了测试,问题仍然很慢连接到Azure数据库。
有什么想法吗?
英文:
I'm working on an issue with my team where we are using Azure SQL Database as a service.
In one example:
- Connecting to azure database via azure app service: call takes 350 ms
- Connecting to azure database via VS 2022 on our work computers: call takes 2.5 seconds
- Connecting to a bacpac database (from the azure database) locally on sql server on our work computers: call takes 350 milliseconds
Things we have done:
- Change the pricing tier from elastic pool to Standard S2: 50 DTUs -> still the same slowness
- Changed the location of the azure database
- Optimized some of the calls (helps, but we still see a big difference between local db and azure database)
We believe it could have something to do with the overall specific call to the server where we are making X calls to the database and opening a connection for each one?
Still doesn't seem to make sense of why it works so fast locally, but then when we connect to the azure database while developing it is so slow.
Also, it seems that this USE to not be the issue. We thought maybe a change in our work VPN could have caused it, but we've tested off the VPN and the issue still is slow connecting to the azure database.
Any thoughts?
答案1
得分: 0
解决方案:
问题与我们公司的工作 VPN 相关。
已设置分流隧道以解决工作站到 Azure 数据库流量的问题。(现在不再通过 VPN 网络进行评估)。
英文:
Solution:
The issue was tied to our company work VPN.
A split-tunnel was setup to resolve the issue for the workstation to azure db traffic. (It is not evaluated via the VPN network now).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论