Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-817

Randomly freezing

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.8.2
    • Component/s: None
    • Environment:
      Server farm mongodb, replicaset + shard version 2.4.6 (64bit 2008R2)
      Client app is running on .NET Framweork 4.5

      A SystemFileWatcher is running and delegate execution using reflection, the system perform multiple kind of actions,including data import into MongoDB since 2 years. The system suddenly start freezing when handling MongoDB import. This occurs after switching the project to .NET Framework 4.5 .
      I never find any way to predict the freezing behavior and restarting the application allow to continue the processing.

      Please find hereafter the failing code: no exception triggered, only apps freezing.

      public bool Save(MongoCollection col, bool replace)
      {
      this.CountSet++;
      if (Id == ObjectId.Empty)

      { MongoGridFSFileInfo gridFsInfo = col.Database.GridFS.Upload(LocalFilename, this.Name + this.Ext); this.Id = gridFsInfo.Id.AsObjectId; col.Save(this,WriteConcern.Acknowledged); }

      else
      {
      if (replace)
      {
      using (var fs = new FileStream(LocalFilename,
      FileMode.Open))

      { col.Database.GridFS.DeleteById(Id); MongoGridFSCreateOptions opt = new MongoGridFSCreateOptions(); opt.Id = Id; MongoGridFSFileInfo gridFsInfo = col.Database.GridFS.Upload(fs, this.Name + this.Ext, opt); }

      }
      col.Save(this, WriteConcern.Acknowledged);
      }
      return true;
      }

            Assignee:
            Unassigned Unassigned
            Reporter:
            abigate John Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: