1

In Sitecore 9.2, our user is trying to upload a fairly large file (Large, but within configured limits.) In the Media Library, we navigate to the desired folder, click Upload, select the desired file, and click the Upload button. The buttons in the dialog are immediately disabled, but nothing else happens. No error is returned and nothing is logged: it "fails ambiguously," as I call it.

Is this familiar, and does it have a known cause or work-around?

3
  • Few questions. Did you check console as well as sitecore logs? Does another file same size but different file type also fail? What about smaller same file extension? Also can different users repeat problem? Can an admin user upload same file? Apr 12, 2023 at 20:33
  • How long have you waited for it to upload? Apr 13, 2023 at 7:27
  • Good call on checking the console (hadn't thought to check that): after 10 or 15 seconds it posts the error "POST cms01.health.mil/sitecore/shell/Applications/Media/… 413 (Request Entity Too Large)" I could swear I, for one, have uploaded larger, but not recently. Now researching IIS/web.config settings to change to correct this. Apr 13, 2023 at 15:44

4 Answers 4

1

Here are a few suggestions to troubleshoot and potentially resolve the problem:

  • Check the Sitecore logs: Review the Sitecore logs to see if there are any error messages or warnings related to the upload process. Look for any relevant information that might indicate the cause of the issue.
  • Increase the upload limits: Ensure that the configured limits for file uploads in Sitecore are set appropriately to accommodate the size of the file you're trying to upload. Check the maxRequestLength and executionTimeout settings in your web.config file to adjust the limits if necessary.
  • Check server resources: Verify that the server has enough resources (such as disk space, memory, and CPU) to handle the upload process for large files. Insufficient resources can cause the upload to fail silently.
  • Network issues: Large file uploads can be sensitive to network conditions. Check for any network-related issues such as slow or unstable connections that may be interrupting the upload process. Try uploading the file from a different network or location to see if the issue persists.
  • Test with smaller files: Attempt to upload smaller files to see if they are processed successfully. This can help determine if the issue is specifically related to the size of the file being uploaded.

Workaround: If the issue persists, consider alternative methods for uploading large files, such as using FTP or a dedicated file transfer service. You can then reference the uploaded files in Sitecore by creating media items that point to the uploaded files.

0

Further to comments, having confirmed that console was logging errors about size of request entity, suggest increasing the value of:

<httpRuntime maxRequestLength="128000" />

Further info here: https://doc.sitecore.com/xp/en/SdnArchive/FAQ/Administration/Size%20Limitations%20for%20File%20Uploading.html

0

I agree with @Dean and add on to that, If you change the maxRequestLength setting, you should also change the Media.MaxSizeInDatabase setting.Media.MaxSizeInDatabase should always be less than maxRequestLength.

1. Sitecore media file size setting

By default, Sitecore allows files of up to 500MB in the media library. This is very large and files of even a 100th of this size will likely be a problem for your site. The patch file to override the default size and set the max size too, say, 10MB looks like this.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <settings>
      <setting name="Media.MaxSizeInDatabase" value="500MB">
        <patch:attribute name="value">10MB</patch:attribute>
      </setting>
    </settings>
  </sitecore>
</configuration>

With this setting and the uploader set to classic, you should no longer be able to upload a file large than 10MB. This dialog is displayed when attempting to upload an oversized file.

enter image description here

2. Maximum Allowed Upload Size

You want to allow the webserver to allow uploads as big as the maximum media file setting. Check the web.config for this setting. Below is an example.

<system.web>
 <httpRuntime targetFramework="4.7.1" maxRequestLength="512000" executionTimeout="600" enableKernelOutputCache="false" relaxedUrlToFileSystemMapping="false" enableVersionHeader="false"/>
</system.web>

The server is set to receive files up to 500MB in size. This is fine with the media file restriction and can be left as is, but you might want to reduce this setting to be in line with the media file limit you have set so that the web server can provide the initial limit before allowing an upload that is destined to fail in Sitecore through.

Hope it helps!

0

As the other guys suggested, you're facing it because the package is bigger than allowed by your settings.

I have another approach to dealing with huge packages, try to divide this big package into small ones. I've developed a module to do it, check it out:

https://alvaropmontenegro.com/2023/04/13/media-package-generator/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.