liubiao4123 / servicestack

Automatically exported from code.google.com/p/servicestack
0 stars 0 forks source link

ServiceStack.Redis reading large files from Redis server #74

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I was testing the ServiceStack Redis client and i got an error related to the 
size of the package in Windows Server 2003 R2.

For files smaller than 30MB works fine, but for files bigger than 32-33MB it 
started to send errors. And it only happened in Windows Server 2003 R2, I 
tested in Windows 7 and Windows 2008 R2 successfully.

What steps will reproduce the problem?
1. Run the next code in a Windows 2003 server R2 pc with files greater than 35 
MB

The code:

<!-- language: c# -->

    String text = File.ReadAllText("file.xml");
    String key = Guid.NewGuid().ToString();            
    if (redisClient.Add(key, text, DateTime.Now.AddSeconds(300)))
        String Result = redisClient.Get<object>(key) as String; *** ERROR

The error:

    System.Net.Sockets.SocketException (0x80004005): An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

What is the expected output? What do you see instead?
I want to write and read large files, but i am getting a socket exception

What version of the product are you using? On what operating system?
ServiceStack.Redis 3.9.60.0
Windows server 2003 R2 SP1

*** I ran the same code in Windows 7 and Windows server 2008 successfully

Does anyone know if it is because an OS restriction or it is a problem with the 
ServiceStack client for Redis.

Thanks in advance.

Original issue reported on code.google.com by randall...@gmail.com on 28 Oct 2013 at 2:55