Problem with Realm on Azure Asp Core


I have Asp Core .NET that using 10 Realm Instances.
All ok on MacBook local server, but when I deploy on Azure, I can open only 4 Realm any time and app run great.
When I open Realm N.5 I obtain a server timeout.

I have already set:

var root = Path.GetTempPath();
SyncConfigurationBase.Initialize(UserPersistenceMode.NotEncrypted, basePath: root);

Too many open files? How I can close a Realm in .NET. I have try a User.Logout any time but I have always same error.



Realm instances are disposable, so you can call .Dispose or just initialize them in a using statement to close them. It’s a bit surprising that the file descriptor limit is so low on Azure - perhaps you should look for a way to raise it.


Thank for the answer. I have try to Dispose() last Realm before open next Realm but It’s don’t work.
I have no idea how increase descriptor limit on Azure.


There should be a webconfig settings for that, but i’m not developing to .netCore since 2 years :slight_smile:


ok, thanks! I have solved call realm.Dispose.

This don’t works:


This works!

Realm realm= Realm.GetInstance(config); //Store this realm in Controller

and after: