Created
October 28, 2012 09:47
-
-
Save lanwin/3968193 to your computer and use it in GitHub Desktop.
Raven Client 1.2.2127 OOM on inserting large amounts of data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OutOfMemoryTest | |
{ | |
public void Run() | |
{ | |
// client version 1.2.2127 | |
using(var store = new DocumentStore | |
{ | |
Url = "http://TestRaven:8080", | |
DefaultDatabase = "Test", | |
}) | |
{ | |
LogManager.DisableLogging(); | |
store.Initialize(); | |
store.Conventions.ShouldCacheRequest = url => false; | |
store.MaxNumberOfCachedRequests = 0; | |
store.EnlistInDistributedTransactions = false; | |
using(store.DisableAggressiveCaching()) | |
{ | |
while(true) | |
using(var session = store.OpenSession()) | |
{ | |
for(var i = 0; i < 1000; i++) | |
session.Store(new Article {Text = "foobar"}); | |
session.SaveChanges(); | |
} | |
} | |
} | |
} | |
public class Article | |
{ | |
public string Text { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed