我正在将 Web 应用程序移植到 aws。有一个 aspx 页面,它整理了来自 3 个不同数据库的大约 15 或 20 个不同表数据表的信息。它在 godaddy 共享主机和我的开发服务器上运行良好,但是当我将它放在 aws 上的微型实例 ec2 上时(不确定这是否与问题有关,只是试图提供尽可能多的信息)我是得到随机错误。我有时会工作,但我经常收到以下错误
内部连接致命错误
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler,
SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at UtilitiesLib.csharp.CSharpSqlServer.executeQuery(String sqlstring) in X:\code\UtilitiesLibCSharp\CSharpSqlServer.cs:line 87 at UtilitiesLib.data.Database.executeQuery(DataClass obj, String sqlstring)
in X:\code\UtilitiesLibSL\data\Database.cs:line 67
at UtilitiesLib.data.DataClass.loadSQLObject(Database db, DataClass obj, Int32[] cols, String[] signs, String[] vals, String[] ops) in X:\code\UtilitiesLibSL\data\DataClass.cs:line 253
at UtilitiesLib.data.reading.TestBlockItemMathProblem..ctor(Database db, Int32 blockid, Int32 teacherid) in X:\code\UtilitiesLibSL\data\reading\TestBlockItemMathProblem.cs:line 30
at UtilitiesLib.transport.reading.readingTCPCommHandlerClient.getTestBlockItem(Int32 type, Database db, Int32 blockid, Int32 teacherid) in X:\code\UtilitiesLibSL\transport\reading\readingTCPCommHandlerClient.cs:line 325
at reading.test.Page_Load(Object sender, EventArgs e) in X:\code\reading\test.aspx.cs:line 157
有时我得到一个不同的错误,说明连接已经关闭。
这非常奇怪,因为我对共享主机或我的开发服务器上的站点没有任何问题。aws 机器正在运行 windows 2008 server 和 iis 7.5 和 sql server express 2008 r2。站点中还有其他页面使用数据表很好,并且从未出现此错误,但它们使用的数据表较少。有人知道是什么原因造成的吗?