找回密码
 立即注册

QQ登录

只需一步,快速开始

myluck2008

中级会员

5

主题

33

帖子

706

积分

中级会员

积分
706

[已处理] 转出EXCEl报错

myluck2008
中级会员   /  发表于:2023-10-11 11:40  /   查看:1368  /  回复:6
1金币




在执行导出操作时,未知的异常出现。请再次尝试。
{
  "ClassName": "System.AggregateException",
  "Message": "One or more errors occurred.",
  "Data": null,
  "InnerException": {
    "$type": "System.Data.SqlClient.SqlException, System.Data.SqlClient",
    "ClassName": "System.Data.SqlClient.SqlException",
    "Message": "Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.",
    "Data": {
      "$type": "System.Collections.ListDictionaryInternal, System.Private.CoreLib",
      "HelpLink.ProdName": "Microsoft SQL Server",
      "HelpLink.ProdVer": "13.00.4001",
      "HelpLink.EvtSrc": "MSSQLServer",
      "HelpLink.EvtID": "-2",
      "HelpLink.BaseHelpUrl": "https://go.microsoft.com/fwlink",
      "HelpLink.LinkId": "20476",
      "SqlError 1": "System.Data.SqlClient.SqlError: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding."
    },
    "InnerException": {
      "$type": "System.ComponentModel.Win32Exception, Microsoft.Win32.Primitives",
      "ClassName": "System.ComponentModel.Win32Exception",
      "Message": "等待的操作过时。",
      "Data": null,
      "InnerException": null,
      "HelpURL": null,
      "StackTraceString": null,
      "RemoteStackTraceString": null,
      "RemoteStackIndex": 0,
      "ExceptionMethod": null,
      "HResult": -2147467259,
      "Source": null,
      "WatsonBuckets": null,
      "NativeErrorCode": 258
    },
    "HelpURL": null,
    "StackTraceString": "   at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__126_0(Task`1 result)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Forguncy.DataSourceBase.FillTableAsync(String commandText, IEnumerable`1 parameters)
   at ForguncyDataAccess.DataAccess.a(String A_0, String A_1, DataBaseType A_2, DbParameter[] A_3)
   at ForguncyDataAccess.DataAccess.SelectAsync(List`1 columnBindingInfos, ISqlCondition selectCondition, TopSqlConditionBase topCondition, String tableName, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean useGroupBy)
   at Forguncy.Server2.ForguncyServerDataAccess.SelectAsync(List`1 columnBindingInfos, ISqlCondition selectCondition, TopSqlConditionBase topCondition, String tableName, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean useGroupBy)
   at ForguncyDataAccess.DataAccess.GetDetailDataTableAsync(List`1 columnBindingInfos, ISqlCondition sqlCondition, TopSqlConditionBase topCondition, OrderBySqlCondition orderByCondition, List`1 primaryKeys, OffsetSqlCondition offsetCondition, Boolean distinct)
   at ForguncyDataAccess.DataAccess.<>c__DisplayClass30_0.<<GetDetailDataTable>b__0>d.MoveNext()",
    "RemoteStackTraceString": null,
    "RemoteStackIndex": 0,
    "ExceptionMethod": null,
    "HResult": -2146232060,
    "Source": "Core .Net SqlClient Data Provider",
    "WatsonBuckets": null,
    "Errors": null,
    "ClientConnectionId": "e4252761-1bb5-4ff7-93fb-0b5e93fb2745"
  },
  "HelpURL": null,
  "StackTraceString": "   at Forguncy.Server2.Controllers.b.a9(String A_0, String A_1)
   at Forguncy.Server2.Controllers.a.a(ListViewInfo A_0, Boolean A_1)
   at Forguncy.Server2.Controllers.a.e(GcExcelSheetWrapper A_0, List`1 A_1)
   at Forguncy.Server2.Controllers.a.b(Int32 A_0)
   at Forguncy.Server2.Controllers.a.c(Int32 A_0)
   at Forguncy.Server2.Controllers.a.a(Int32 A_0)
   at Forguncy.Server2.Controllers.a.a(Func`2 A_0)
   at Forguncy.Server2.Controllers.a.c(Boolean A_0)
   at Forguncy.Server2.Controllers.a.i()
   at Forguncy.Server2.Controllers.HomeController.a(Object A_0)",
  "RemoteStackTraceString": null,
  "RemoteStackIndex": 0,
  "ExceptionMethod": null,
  "HResult": -2146233088,
  "Source": "Forguncy.Server2",
  "WatsonBuckets": null,
  "InnerExceptions": {
    "$type": "System.Exception[], System.Private.CoreLib",
    "$values": [
      {
        "$type": "System.Data.SqlClient.SqlException, System.Data.SqlClient",
        "ClassName": "System.Data.SqlClient.SqlException",
        "Message": "Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.",
        "Data": {
          "$type": "System.Collections.ListDictionaryInternal, System.Private.CoreLib",
          "HelpLink.ProdName": "Microsoft SQL Server",
          "HelpLink.ProdVer": "13.00.4001",
          "HelpLink.EvtSrc": "MSSQLServer",
          "HelpLink.EvtID": "-2",
          "HelpLink.BaseHelpUrl": "https://go.microsoft.com/fwlink",
          "HelpLink.LinkId": "20476",
          "SqlError 1": "System.Data.SqlClient.SqlError: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding."
        },
        "InnerException": {
          "$type": "System.ComponentModel.Win32Exception, Microsoft.Win32.Primitives",
          "ClassName": "System.ComponentModel.Win32Exception",
          "Message": "等待的操作过时。",
          "Data": null,
          "InnerException": null,
          "HelpURL": null,
          "StackTraceString": null,
          "RemoteStackTraceString": null,
          "RemoteStackIndex": 0,
          "ExceptionMethod": null,
          "HResult": -2147467259,
          "Source": null,
          "WatsonBuckets": null,
          "NativeErrorCode": 258
        },
        "HelpURL": null,
        "StackTraceString": "   at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__126_0(Task`1 result)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Forguncy.DataSourceBase.FillTableAsync(String commandText, IEnumerable`1 parameters)
   at ForguncyDataAccess.DataAccess.a(String A_0, String A_1, DataBaseType A_2, DbParameter[] A_3)
   at ForguncyDataAccess.DataAccess.SelectAsync(List`1 columnBindingInfos, ISqlCondition selectCondition, TopSqlConditionBase topCondition, String tableName, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean useGroupBy)
   at Forguncy.Server2.ForguncyServerDataAccess.SelectAsync(List`1 columnBindingInfos, ISqlCondition selectCondition, TopSqlConditionBase topCondition, String tableName, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean useGroupBy)
   at ForguncyDataAccess.DataAccess.GetDetailDataTableAsync(List`1 columnBindingInfos, ISqlCondition sqlCondition, TopSqlConditionBase topCondition, OrderBySqlCondition orderByCondition, List`1 primaryKeys, OffsetSqlCondition offsetCondition, Boolean distinct)
   at ForguncyDataAccess.DataAccess.<>c__DisplayClass30_0.<<GetDetailDataTable>b__0>d.MoveNext()",
        "RemoteStackTraceString": null,
        "RemoteStackIndex": 0,
        "ExceptionMethod": null,
        "HResult": -2146232060,
        "Source": "Core .Net SqlClient Data Provider",
        "WatsonBuckets": null,
        "Errors": null,
        "ClientConnectionId": "e4252761-1bb5-4ff7-93fb-0b5e93fb2745"
      }
    ]
  }
}

CurrentMethodName: ExportToExcelThread


你好,转出EXCEl报错,如何解决?谢谢!
已经才数据420条

附件: 您需要 登录 才可以下载或查看,没有帐号?立即注册

6 个回复

倒序浏览
Nathan.guo活字格认证 Wyn认证
超级版主   /  发表于:2023-10-11 17:11:44
沙发
大佬是否方便抽个demo出来呀~~
看大佬发的日志只能猜测数据库请求数据超时了,但分析不了具体的原因
回复 使用道具 举报
Nathan.guo活字格认证 Wyn认证
超级版主   /  发表于:2023-10-24 18:14:55
板凳
大佬,方便问下这个问题现在解决了吗
回复 使用道具 举报
myluck2008
中级会员   /  发表于:2023-10-28 13:51:49
地板
Nathan.guo 发表于 2023-10-24 18:14
大佬,方便问下这个问题现在解决了吗

没有,但有时又可以导出
回复 使用道具 举报
Erik.Xue讲师达人认证 悬赏达人认证 活字格认证 Wyn认证
超级版主   /  发表于:2023-10-30 09:23:37
5#
大佬,这个能否提供个demo,如果担心数据泄露,可以把数据脱敏下,我们这边调查下~
回复 使用道具 举报
Nathan.guo活字格认证 Wyn认证
超级版主   /  发表于:2023-10-30 09:24:06
6#
myluck2008 发表于 2023-10-28 13:51
没有,但有时又可以导出

只有这个报错的话,我这边也只能猜测~~
1.大佬可以检查下数据库超时时间设置的是多少,是不是太短了
2.检查下数据库的连接数量,及设置的最大连接数,看看是不是最大连接数太少了
3.检查下数据库环境是否稳定
回复 使用道具 举报
Tony.Fu活字格认证 Wyn认证
超级版主   /  发表于:2023-10-31 18:11:13
7#
myluck2008您好,请问这个问题解决了吗?如果仍有问题烦请您提供一个demo 我们来调查哈
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部