Uploaded image for project: 'Realm .NET SDK'
  1. Realm .NET SDK
  2. RNET-22

SetEndOfFile() failed: The requested operation cannot be performed on a file with a user-mapped section open.

      <!--- Questions: If you have questions about how to use Realm, please ask on -->
      <!--- StackOverflow: http://stackoverflow.com/questions/ask?tags=realm -->
      <!--- We monitor the realm tag. -->

      <!--- Feature Request: Just fill in the first two sections below. -->

      <!--- Bugs: To help you as fast as possible with an issue please describe your issue -->
      <!--- and the steps you have taken to reproduce it in as much detail as possible. -->

      <Unable to render embedded object: File (--- Thanks for helping us help you) not found. -->

      Goals

      We have a ASP.NET Core GraphQL server that is built on top of Realm .NET SDK and are having occasional stability issues when trying to open a synchronized Realm.

      Expected Results

      Execute Realm.GetInstance(config) consistently without error.

      Actual Results

      Some time after the GraphQL server has started and an indeterminate amount of user activity, every call to Realm.GetInstance(config) throws this error:

      Sep 29 10:53:29 52.170.18.62 ThreadAPI: ERROR - SetEndOfFile() failed: The requested operation cannot be performed on a file with a user-mapped section open.
      Sep 29 10:53:29 52.170.18.62 ThreadAPI: GraphQL.ExecutionError: SetEndOfFile() failed: The requested operation cannot be performed on a file with a user-mapped section open. ---> GraphQL.Conventions.Execution.FieldResolutionException: SetEndOfFile() failed: The requested operation cannot be performed on a file with a user-mapped section open. ---> Realms.Exceptions.RealmException: SetEndOfFile() failed: The requested operation cannot be performed on a file with a user-mapped section open.
      Sep 29 10:53:29 52.170.18.62 ThreadAPI:    at Realms.NativeException.ThrowIfNecessary(Func`2 overrider)
      Sep 29 10:53:29 52.170.18.62 ThreadAPI:    at Realms.Sync.SharedRealmHandleExtensions.OpenWithSync(Configuration configuration, SyncConfiguration syncConfiguration, RealmSchema schema, Byte[] encryptionKey)
      Sep 29 10:53:29 52.170.18.62 ThreadAPI:    at Realms.Sync.SyncConfigurationBase.CreateRealm(RealmSchema schema)
      Sep 29 10:53:29 52.170.18.62 ThreadAPI:    at Thread.DomainData.RealmFactory.Open(String orgId, String studentId, SyncArchitecture architecture, String syncHost) in D:\a\1\s\DomainData\RealmFactory.cs:line 254The only way for us to get it out of this state is to restart the GraphQL server entirely.
      

      Version of Realm and Tooling

      • Realm Object Server Version: 3.25.5
      • Flavor:
        • [x] Realm Cloud
        • [ ] Self-Hosted
      • Client SDK Version: 4.1.0
      • Client OS & Version: Azure App Service on Windows (Microsoft Windows NT 10.0.14393.0)

            Assignee:
            yavor.georgiev@mongodb.com Yavor Georgiev
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: