解决aspnet中“Thread was being aborted.”

一、系统环境
开发环境
1、操作系统:Windows10 Business 64bit,内存8G
2、软件环境:Asp.Net4.0、IIS7.0、5.6.26-log MySQL Community Server
部署环境
1、操作系统:Windows7 Professional 32bit,内存:4G
2、软件环境:Asp.Net4.0、IIS7.0、5.6.26-log MySQL Community Server

二、问题描述
程序在[开发环境]正常运行
程序在[部署环境]中IIS配置可以正常访问aspx页面,无容器级别的BUG,但是在导出数据时,运行1~2min开始报以下错误:

[2018-10-16 14:25:08,694][7792][ERROR][JH.LDR.Web.Ajax.AjaxJsonBase]-HOST:::1,MAC:10-E7-C6-B3-29-E0,ERROR:Thread was being aborted.
[2018-10-16 14:25:09,077][7792][ERROR][JH.LDR.Web.Ajax.AjaxJsonBase]- at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List`1.set_Capacity(Int32 value)
at System.Collections.Generic.List`1.EnsureCapacity(Int32 min)
at System.Collections.Generic.List`1.Add(T item)
at System.Text.RegularExpressions.RegexNode.AddChild(RegexNode newChild)
at System.Text.RegularExpressions.RegexParser.ScanRegex()
at System.Text.RegularExpressions.RegexParser.Parse(String re, RegexOptions op)
at System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options, Boolean useCache)
at JH.LDR.Common.NPOIHelper.isNumeric(String message, Double& result)
at JH.LDR.Common.NPOIHelper.ExportDTI(DataTable dtSource, String strHeaderText, FileStream fs)
at JH.LDR.Common.NPOIHelper.ExportDTtoExcel(DataTable dtSource, String strHeaderText, String strFileName)
[2018-10-17 10:42:52,070][4556][ERROR][JH.LDR.Web.Ajax.AjaxJsonBase]-HOST:::1,MAC:10-E7-C6-B3-29-E0,ERROR:Thread was being aborted.
[2018-10-17 10:42:52,196][4556][ERROR][JH.LDR.Web.Ajax.AjaxJsonBase]- at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken)
[2018-10-19 10:48:54,433][3928][ERROR][JH.LDR.Web.Ajax.AjaxJsonBase]-HOST:::1,MAC:10-E7-C6-B3-29-E0,ERROR:Thread was being aborted.
[2018-10-19 10:48:54,796][3928][ERROR][JH.LDR.Web.Ajax.AjaxJsonBase]- at MyNetworkStream.HandleOrRethrowException(Exception e)

三、解决办法及思路
1、首先每次报错都有“ERROR:Thread was being aborted”,但细节错误不一样,起初认为是IIS内存不够导致,因为导出数据量较多;修改导出方案为分批次导出数据,报错依旧
2、修改IIS的虚拟内存使用情况及专用内存使用情况:1024*1024=1048576(KB),错误依旧
3、通过虚拟机模拟部署环境:可以正常导出。
操作系统:Windows7 Professional 32bit,内存:2G
软件环境:Asp.Net4.0、IIS7.0

4、Google“asp.net Thread was being aborted”找到参考资料[1]得到启发,根据参考资料[2]在web.cofnig配置<system.web>节点增加相关配置,成功导出数据
<system.web>
    <httpRuntime maxRequestLength="102400" executionTimeout="720" />
</system.web>
参考资料[3]中为页面跳转时错误,可以通过try,catch搞定;该程序未涉及,但网上转发较多
步骤如有遗漏,请多指教
四、参考资料
1、Why am i getting “Thread was being aborted” in asp.net?
2、如何设置ASP.NET页面的运行超时时间
3、Thread was being aborted 分析与解决

mysql5.7 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

一、系统环境
操作系统:Windows Server 2008 R2 Enterprise
mysql版本:
导出表结构服务器:Server version: 5.6.26-log MySQL Community Server (GPL)
导如表结构服务器:Server version: 5.7.10-log MySQL Community Server (GPL)
二、问题描述
由mysql5.6导出表结构导入mysql5.7.10时,无法导入
CREATE TABLE `inpatadmission` (
  `PK_ID` INT(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `DE01_00_014_00` VARCHAR(31) DEFAULT NULL COMMENT '住院号(病历号)',
  ... ...

  `TIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `DATASOURCE_ID` INT(11) DEFAULT NULL,
  `TASK_CONFIG_LOG_ID` INT(11) DEFAULT NULL,
  PRIMARY KEY (`PK_ID`)
) ENGINE=INNODB ROW_FORMAT=COMPRESSED DEFAULT CHARSET=utf8;
报一下错误:
Error Code : 1118
Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
Execution Time : 00:00:00:000
Transfer Time  : 00:00:00:000
Total Time     : 00:00:00:000
三、解决方法
参考解决办法:
1. 打开mysql的配置my.ini。在innodb配置出添加:innodb_file_per_table=1
2. 然后命令检查下上述开关是否打开。
mysql> show variables like '%per_table%';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| innodb_file_per_table | ON    |
+-----------------------+-------+
1 row in set (0.01 sec)
3. 设置mysql全局变量:innodb_file_format = Barracuda(梭鱼)
命令:set GLOBAL innodb_file_format = ‘Barracuda’;
然后检查下是否设置好了:
mysql> show GLOBAL VARIABLES LIKE '%file_format%';
+--------------------------+----------+
| Variable_name            | Value    |
+--------------------------+----------+
| innodb_file_format       | Antelope |
| innodb_file_format_check | ON       |
| innodb_file_format_max   | Antelope |
+--------------------------+----------+
3 rows in set (0.01 sec)
4. 设置对应表的属性:ROW_FORMAT=COMPRESSED
然后检查下标的属性是否是你设置的:COMPRESSED
5、修改存储引擎(ENGINE)由INNODB修改为MYISAM即可
CREATE TABLE `inpatadmission` (
  `PK_ID` INT(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `DE01_00_014_00` VARCHAR(31) DEFAULT NULL COMMENT '住院号(病历号)',
  ... ...

  `TIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `DATASOURCE_ID` INT(11) DEFAULT NULL,
  `TASK_CONFIG_LOG_ID` INT(11) DEFAULT NULL,
  PRIMARY KEY (`PK_ID`)
) ENGINE=MYISAM ROW_FORMAT=COMPRESSED DEFAULT CHARSET=utf8;
原因未知,先记下来
四、参考资料