[CSHARP-662] Thread was being aborted Created: 17/Jan/13  Updated: 16/Nov/21  Resolved: 14/Mar/13

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.7
Fix Version/s: None

Type: Bug Priority: Blocker - P1
Reporter: David Verdejo Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Webservice:
Windows 2003 Enterprise 32 bits SP2 (update with last Microsft's patches)
24 cores
16 GB RAM
IIS 6
Net Framework 2.0 and 4.0 installed

MongoDB:
Windows 2012 (update with last Microsft's patches)
4 cores
16 GB RAM
Mongo 2.2.2



 Description   

We have a WebService in Net Framework 4.0. It has to save a lot of logs to mongodb database (estimation per day: 3 million documents, 800 MB).

On peak load, we could see the following error in event viewer:

Event Type: Error
Event Id: 0
Description:
2013-01-17 09:58:13.9687|"Critical"|"STATISTICS"|"Exception in Statistics MongoDB provider SaveToDatabase. LoB: 'Hotels'; App: 'BookingEngine'; Collection: 'Statistics_HotelsBookingEngineProvider'; Statement: 'sqlCommand'.Thread was being aborted.. at Microsoft.Win32.Win32Native.GetComputerName(StringBuilder nameBuffer, Int32& bufferSize) at System.Environment.get_MachineName() at lambda_method(Closure , Object ) at MongoDB.Bson.Serialization.BsonClassMapSerializer.SerializeMember(BsonWriter bsonWriter, Object obj, BsonMemberMap memberMap) at MongoDB.Bson.Serialization.BsonClassMapSerializer.Serialize(BsonWriter bsonWriter, Type nominalType, Object value, IBsonSerializationOptions options) at MongoDB.Bson.Serialization.BsonSerializer.Serialize(BsonWriter bsonWriter, Type nominalType, Object value, IBsonSerializationOptions options) at MongoDB.Driver.Internal.MongoInsertMessage.AddDocument(Type nominalType, Object document) at MongoDB.Driver.MongoCollection.InsertBatch(Type nominalType, IEnumerable documents, MongoInsertOptions options) at MongoDB.Driver.MongoCollection.Insert(Type nominalType, Object document, MongoInsertOptions options) at MongoDB.Driver.MongoCollection.Insert(Type nominalType, Object document) at MongoDB.Driver.MongoCollection.Insert[TNominalType](TNominalType document) at MongoDB.Driver.MongoCollection`1.Insert(TDefaultDocument document) at Toolfactory.Database.MongoDB.DB.Insert[T](String connectionString, String database, String collectionName, T item) at Toolfactory.Audit.Statistics.MongoDBProvider`1.saveToDatabase(String collectionName, TStatistics statisticsData)"|"00000000-0000-0000-0000-000000000000"|"[NO FLOW]"|"[NO PROCESS POINT]"||



 Comments   
Comment by Craig Wilson [ 04/Mar/13 ]

Sorry it took so long to get back to you. I simply missed this when it came in.

Has this been addressed? If no, could you answer some questions:

1) What does the class look like that you are attempting to save?
2) Are you calling Environment.MachineName in your property?

Generated at Wed Feb 07 21:37:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.