【发布时间】:2017-12-07 12:01:33
【问题描述】:
我很难调试服务。
我将首先解释我正在运行的场景。 我使用他们的服务导入、生成报告和导出数据获得了 9 个数据库。 它们都运行了一两天,但是在亚音速开始在有新连接到数据库时给出异常之后,所有异常都是相似的,只需更改数据库操作,有一个例子:
Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.
at System.Buffer.InternalBlockCopy(Array src, Int32 srcOffsetBytes, Array dst, Int32 dstOffsetBytes, Int32 byteCount)
at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
at System.IO.TextWriter.WriteLine(String value)
at System.IO.TextWriter.WriteLine(String format, Object arg0)
at System.IO.TextWriter.SyncTextWriter.WriteLine(String format, Object arg0)
at SubSonic.DataProviders.DbDataProvider.ExecuteReader(QueryCommand qry) in C:\[path]\SubSonic.Core\DataProviders\DbDataProvider.cs:line 112
at SubSonic.Linq.Structure.DbQueryProvider.Execute[T](QueryCommand`1 query, Object[] paramValues) in C:\[path]\SubSonic.Core\Linq\Structure\DbQueryProvider.cs:line 280
at lambda_method(Closure )
at SubSonic.Linq.Structure.DbQueryProvider.Execute(Expression expression) in C:\[path]\SubSonic.Core\Linq\Structure\DbQueryProvider.cs:line 131
at SubSonic.Linq.Structure.QueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) in C:\[path]\SubSonic.Core\Linq\Structure\QueryProvider.cs:line 50
at SubSonic.Linq.Structure.Query`1.GetEnumerator() in C:\[path]\SubSonic.Core\Linq\Structure\Query.cs:line 85
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at [namespace].ReportManager.GetAllPending() in [path]\ReportManager.cs:line 193
at [namespace].ReportsServiceHandler.Run() in C:\[path]\ReportsServiceHandler.cs:line 137
到目前为止,我唯一的解决方案是重置服务,但我还没有发现可能导致此问题的原因。我尝试在本地环境中调试它,但我无法做到。
有人知道亚音速是否存在错误,或者我如何在服务中找到问题?
提前感谢您的帮助。
【问题讨论】: