- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
SQL Azure 问题。
我遇到了一个问题,在我们的 (asp.net) 网站上表现为以下异常:
Timeout expired. The timeout period elapsed prior to completion ofthe operation or the server is not responding. The statement has beenterminated.
这还会导致 SMSS 中的更新和插入语句永远无法完成。查询时不存在任何 X 或 IX 锁:sys.dm_tran_locks
查询sys.dm_tran_active_transactions
时没有任何交易或sys.dm_tran_database_transactions
.
数据库中的每个表都存在该问题,但同一实例上的其他数据库不会导致该问题。问题的持续时间可能为 2 分钟到 2 小时,并且不会发生在一天中的任何特定时间。
数据库未满。
此问题一度未能自行解决,但我能够通过查询 sys.dm_exec_connections
解决该问题找到运行时间最长的 session ,然后终止它。奇怪的是,连接已经建立了 15 分钟,但锁定问题已经存在了 3 个多小时。
还有什么我可以检查的吗?
编辑
正如下面保罗的回答。在他回答之前我实际上已经找到了问题所在。我将在下面发布我用来解决此问题的步骤,以防对其他人有所帮助。
存在“超时期限”时运行以下查询。
select * from sys.dm_exec_requests
正如我们所看到的,所有 WAIT 请求都在 session 1021 上等待,这是复制请求! TM Request
表示DTC事务,我们不使用分布式事务。还可以看到SE_REPL_COMMIT_ACK
的wait_type这再次暗示了复制。
select * from sys.dm_tran_locks
再次等待 session 1021
SELECT * FROM sys.dm_db_wait_stats ORDER BY wait_time_ms desc
是的,SE_REPL_CATCHUP_THROTTLE
总等待时间为 8094034ms,那就是134.9分钟!!!
另请参阅以下论坛以获取有关此问题的详细信息。 http://social.technet.microsoft.com/Forums/en-US/ssdsgetstarted/thread/c3003a28-8beb-4860-85b2-03cf6d0312a8
I've been given the following answer in my communication withMicrosoft (we've seen this issue with 4 of our 15 databases in the EUdata center):
Question: Have there been changes to these softthrottling limits in the last three weeks ie since my problemsstarted?
Answer: No, there has not.
Question: Are there ways we canprevent or be warned we are approaching a limit?
Answer: No. The issuemay not be caused by your application but can be caused by othertenants relying on the same physical hardware. In other words, yourapplication can have very little load and still run into the problem.In other words, your own traffic may be a cause of this problem, butit can just as well be caused by other tenants relying on the samephysical hardware. There's no way to know beforehand that the issuewill soon occur - it can occur at any time without warning. The SQLAzure operations team does not monitor this type of error, so theywon't automatically try to solve the problem for you. So if you runinto it you have two opitions:
Create a copy of your db and use that and hope the db is placed on another server with less load.
Contact Windows Azure Support and inform the about the problem and let them do Option 1 for you
最佳答案
您可能会遇到 SE_REPL* 问题,这些问题目前困扰着许多使用 Sql Azure 的人(包括我的公司)。
当您遇到超时时,请尝试检查等待请求的等待类型:
运行以下命令来检查当前连接的等待类型:
SELECT TOP 10 r.session_id, r.plan_handle,
r.sql_handle, r.request_id,
r.start_time, r.status,
r.command, r.database_id,
r.user_id, r.wait_type,
r.wait_time, r.last_wait_type,
r.wait_resource, r.total_elapsed_time,
r.cpu_time, r.transaction_isolation_level,
r.row_count
FROM sys.dm_exec_requests r
您还可以通过运行以下命令来检查相关历史记录:
SELECT * FROM sys.dm_db_wait_stats
ORDER BY wait_time_ms desc
如果您看到很多 SE_REPL* 等待类型,并且这些类型在您的连接上保持任意时间长度,那么基本上您就完蛋了。微软已经意识到这个问题,但我已经向他们提出了一周的支持请求,显然他们仍在努力解决这个问题。
当 Sql Azure 复制从属落后时,SE_REPL* 等待就会发生。基本上整个数据库在复制 catch 时暂停查询:/
因此,本质上使 Sql Azure 具有高可用性的方面是导致数据库随机不可用。如果这不是要了我们的命,我会 mock 这个讽刺。
查看此线程以了解详细信息: http://social.technet.microsoft.com/Forums/en-US/ssdsgetstarted/thread/c3003a28-8beb-4860-85b2-03cf6d0312a8
关于SQL Azure - 一个 session 锁定整个数据库以进行更新和插入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15788798/
我对 Java 并发性比较陌生(还没有阅读 JCIP,但它在我的列表中!)并且我有一个关于锁定行为的问题。具体来说,Java 是锁定对象的引用,还是锁定对象本身? 代码示例(不是 sscce,因为我不
我的团队使用 TortoiseSVN 编写版本控制代码。有时,有人使用“获取锁定”选项。是否有可能看到解决方案中的锁? 最佳答案 http://tortoisesvn.net/docs/nightly
我在使用 SVN 时遇到了一个小问题。 当我跑 svn stat我明白了: ~ some/dir 当我跑 svn commit -m "test"我明白了:svn: working copy
我启用了 jenkins 安全性,认为它会提示我创建一个帐户。我尝试在 c:/program files/jenkins 中删除和编辑我的 config.xml 文件,但我不确定如何在没有访问权限的情
实现与 S3 结合使用的简单锁定机制的推荐方法是什么? 我想做的例子: 通过对象 ID 获取锁 从 S3 读取对象 修改数据 将对象写入 S3 释放锁 理想情况下寻找基于云的锁定机制。我可以在本地使用
找到这个here : 一般来说,在以下任何情况下,请考虑在列上创建索引: 索引列上存在引用完整性约束,或者列。索引是避免全表锁的一种方法,否则,如果您更新父表主键,则需要,合并到父表中,或从父表中删除
在我的程序中,我将把每个“ block ”数据存储在一个单独的文件中。多个线程都会读取和写入各种文件,我想避免因未正确同步而可能出现的问题。本质上,我想要一个设置,其中每个文件的行为就好像它有自己的
我想使用此script作为资源,通过使用Windows API(重置管理器)与Go for Windows中的内容相同 到目前为止,我的代码是 Rstrtmgr := syscall.NewLazyD
这里的问题是:“这些选择中的哪一个对于线程安全选择的剧院具有最佳性能?” public static List lockList = initializeLocks(); public boolean
我有一个侧面菜单,单击图标时打开,单击页面或单击菜单上的项目时关闭。我正在尝试实现锁定,因此当单击锁定图标时,即使您单击菜单项或页面,菜单也不会关闭。 我能够将图标从锁定图标更改为解锁图标,但我在停止
使用 TRueType 字体编写 SDL 程序。我调用 TTF_Init() 来初始化 TTF 并使用 TTF_OpenFont( name, size ) 打开我的字体。 我有一个例程,可以使用以下
我正在尝试调试基于运行 FreeRTOS 的 STM32F3 uC 的应用程序。我已在应用程序的线程上下文中的随机位置手动将 PSP 设置为无效值(例如 0),希望触发 memManageFault/
我有以下 C# 代码: 1. List bandEdgeList; 2. 3. bandEdgeList = CicApplication.BandEdgeCache.Where(r
我正在用骰子制作游戏。这个想法是持有/锁定骰子。我把骰子做成按钮,这样现在就可以点击它们了。示例:我抛出一个“6”和一个“1”。我点击“6”,所以现在只会抛出“1”。 我对这个有点迷失了,我需要创建
我正在使用以下代码下载约 200mb 的播客并将其写入文档目录: var podcastRequest = NSURLRequest(URL: audioUrl) NSURLConnection.se
下面的类 DoStuff 启动一个线程并同步以保护监听器对象在 null 时不被访问。 现在,当从外部访问 DoStuff 类函数 setOnProgressListener() 时,我遇到了问题,因
我正在编写一个使用巨大背景 Canvas 的网站。我试图锁定浏览器调整大小处理程序以避免滚动问题(背景越界等) 这是我第一次做一个完整的后台网站。任何有关优化的建议(png 大小 580.72 KB
我是 C# 和线程的新手,我有这个问题要解决: 我有一个处理一些数据的线程,它会不时(必要时)触发我在启动线程之前设置的事件方法 (DataProcessor)。该线程位于专有 dll 中。所以我不能
我正在使用相机,我使用的是文档中给出的完全相同的示例: http://developer.android.com/resources/samples/ApiDemos/src/com/example/
我有几个座位可供用户预订。同一时间,只有一个用户可以参与预订过程,这样同一个座位就不会被多个用户预订。在我的 Java 代码中,我使用了“synchronized”关键字来完成它。这行得通。 但是,现
我是一名优秀的程序员,十分优秀!