How can I get the allowed max size for an attachment that can be indexed?
Can I get it from the API somehow or is there some documentation somewhere?
I'm getting the error "(413) Request Entity Too Large." and would like to introduce a convention that validates which media to include when indexing.
We have a custom property for our GenericMedia implementation called "fileSizeInKB" which is set when media is uploaded.
The Find index in question is for a "small" license.
I believe this is a limitation of IIS/ASP.NET, not Find itself. You might want to set maxRequestLength and maxAllowedContentLength in web.config.
Sorry if I was unclear.
The (413) response is sent by the Find service (hosted by EPiServer) when running the built in scheduled job "EPiServer Find Content Indexing Job".
By looking in the debug log and using Fiddler I've come to the conslusion that the cause for this is probably some large files which has been uploaded to the CMS and our current indexing convention allows to be indexed.
The maximum request size to Find is 50mb and by default 5 IContentMedia items may be sent in the same request when using the indexing job. Newer versions of Find will automatically throttle this if it recieves a 413 message and split this into batches of 1 media item but if you are running an old client you have to lower the batch size using:ContentIndexer.Instance.MediaBatchSize = 1;
This way a single request to Find will only contain 1 media item that at most can be 50mb./Henrik
Thanks for the info Henrik!
It also turned out that our production index had a faulty setup with a limit set at 5MB (was done by EPiServer operations) .
So it would be awesome if this kind of info could be easily available.
Perhaps you guys can consider adding it to the Find overview?