向 sharepoint excel 工作簿表 MaxRequestDurationExceeded 添加行时出错 [英] Error when adding rows to a sharepoint excel workbook table MaxRequestDurationExceeded

查看:17
本文介绍了向 sharepoint excel 工作簿表 MaxRequestDurationExceeded 添加行时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里是完整的错误

<代码>{错误":{代码":MaxRequestDurationExceeded",消息":我们很抱歉.我们无法完成您要求我们做的事情,因为这花费了太长时间."内部错误":{代码":gatewayTimeoutUncategorized","message": "服务无法在时限内完成请求.",内部错误":{代码":MaxRequestDurationExceeded",消息":我们很抱歉.我们无法完成您要求我们做的事情,因为这花费了太长时间."},日期":2020-11-24T02:48:23",请求 ID":a3f533ea-3d8e-4bb6-aa71-4eaf10b79364",客户端请求 ID":a3f533ea-3d8e-4bb6-aa71-4eaf10b79364"}}}

当我尝试将记录添加到 Excel 文件时,我收到此错误消息,该消息有点不清楚.起初我每个帖子发送 5k 到 8k excel 记录,所以我想是因为我发送的太多了.我所做的是为每个帖子只发送 3k 条记录,但我仍然收到此错误.

我认为 excel 共享点文件需要一些时间来刷新新发布的数据,因此我在发布命令后添加了 3 分钟的时间延迟,但出现错误

我也试过在邮递员那里我只发送了 1 个测试记录,但我仍然遇到同样的错误,不知道为什么.

进一步检查后,sharepoint 中的工作簿大小似乎有限制.50mb 是限制,我们的 excel 文件已经是 40mb.它已经很接近了,但我还有 10 mb 可用,所以应该没有任何问题.

目前 excel sharepoint 文件有 100 万多条记录

**是的,我们可能不得不重新考虑将 sharepoint excel 文件视为数据库,但现在我想看看是什么导致了所提到的错误,因为它并没有提供太多细节.

编辑:补充细节,之前我在检查有几个实例,测试记录实际上是添加到excel文件中的,但响应仍然是提到的错误消息

我也没有发布代码,因为它上周正在工作,所以我认为错误与我的代码无关,而是由于一些我不知道的其他变量

解决方案

似乎 sharepoint 现在允许再添加到 excel 文件中,因为它已经有大量的记录.根据这些限制:

https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3

https://support.microsoft.com/en-us/office/file-size-limits-for-workbooks-in-sharepoint-9e5bc6f8-018f-415a-b890-5452687b325e>

但是端点没有返回更多信息性错误消息仍然有点奇怪.

here is the full error

{
    "error": {
        "code": "MaxRequestDurationExceeded",
        "message": "We're sorry. We couldn't finish what you asked us to do because it was taking too long.",
        "innerError": {
            "code": "gatewayTimeoutUncategorized",
            "message": "The service wasn't able to complete the request within the time limit.",
            "innerError": {
                "code": "MaxRequestDurationExceeded",
                "message": "We're sorry. We couldn't finish what you asked us to do because it was taking too long."
            },
            "date": "2020-11-24T02:48:23",
            "request-id": "a3f533ea-3d8e-4bb6-aa71-4eaf10b79364",
            "client-request-id": "a3f533ea-3d8e-4bb6-aa71-4eaf10b79364"
        }
    }
}

when I'm trying to add records to an excel file, I get this error message which is a bit unclear. At first I was sending 5k to 8k excel records per post so I thought because I was sending too much. what I did was send only 3k records for every post but still I get this error.

I assumed that the excel sharepoint file need some time to refresh the newly posted data so I added a time delay for 3 minutes after a post command but I get the error

I also tried in postman where I only send 1 test record and I still get the same error, not sure why.

Upon further checking, there appears to be a limit of a workbook size that is in sharepoint. 50mb is the limit, and our excel file is already at 40mb. It is already close, but still I got 10 more mb to use so there shouldn't be any issues.

Currently the excel sharepoint file has 1 million plus records

**yeah we might have to rethink treating the sharepoint excel file as a database but for now I'd like to see what causes the error mentioned since it doesn't really give much details.

edit: additional details, earlier when I was checking there are a few instances that the test records are actually added in the excel file but the response is still the mentioned error message

also I didn't posted the code since it was working last week so I think the error is not related to my code but due to some other variables that I'm not aware of

解决方案

it seems sharepoint is now allowing anymore addition to the excel file since it already has tons of records. as per these limits:

https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3

https://support.microsoft.com/en-us/office/file-size-limits-for-workbooks-in-sharepoint-9e5bc6f8-018f-415a-b890-5452687b325e

but still it is a bit weird that the endpoint does not return a more informative error message.

这篇关于向 sharepoint excel 工作簿表 MaxRequestDurationExceeded 添加行时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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