Deadlock in Web Context

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.2, 2.2.3
    • Component/s: GridFS
    • Environment:
      ASP.Net WebApi
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There appears to be a deadlock when trying to find files in GridFS using the Async method.

      var client = new MongoClient("whatever_connection_str");
      var database = client.GetDatabase("your_db");
      var bucket = new GridFSBucket(database, new GridFSBucketOptions

      { BucketName = "MyDocs" }

      );
      var builder = Builders<GridFSFileInfo>.Filter;

      // userid is embedded in the metadata of the fileinfo, confirmed it's there and correct type etc
      var filter = builder.Eq(info => info.Metadata["UserId"], <any_object_id>);
      var files = await bucket.FindAsync(filter); <-- this deadlocks in ASP.Net

      If you try the same code in a console app it works fine.

              Assignee:
              Unassigned
              Reporter:
              Steven Ward
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: