1

In my RavenDB 2.5.2851 database I want to put attachments up to 2GB.

var store = new DocumentStore { Url = "http://127.0.0.1:8080" }.Initialize();
using (var reader = new StreamReader("test.attachment"))
{
    var id = "attachments/1";
    store.DatabaseCommands.PutAttachment(id, null, reader.BaseStream, null);
}

PutAttachment method started, but after 1,5 minutes the exception thrown: "The request was aborted: The request was cancelled". I think this exception throws because of attachment size limits.

Is there the limit for attachment size? Can I configure it?

Eugene
  • 389
  • 1
  • 7
  • 18

1 Answers1

1

There isn't a limit on attachment size, although big attachments aren't encouraged. The issue is that you are probably hitting request time / size issues. You need to configure IIS properly. Note that we never really meant attachments to hold very large values.

Ayende Rahien
  • 22,925
  • 1
  • 36
  • 41
  • It was such an answer I feared. :) – Eugene Apr 07 '14 at 04:47
  • I too am facing issues saving attachments of size greater than 10 MB. Can you please elaborate what settings should be checked related to "request time / size issues. You need to configure IIS properly." @EvgeniyGryaznov How was your problem solved? – Sachin Sep 10 '14 at 10:29
  • @Sachin, it was experiment to make decision about our technological stack. We didn't use RavenDB as the database in the end. – Eugene Sep 10 '14 at 10:53