Today, I launched the upload of a 521MB Sitecore Install Package from the Sitecore Installation Wizard, and I waited a long time watching the spinner… Way too long! Then I checked my Docker CM container logs to find this clue:
2023-10-04 13:03:47 172.18.168.100 POST /sitecore/shell/applications/install/dialogs/Upload+Package/UploadPackage2.aspx di=%7B0226A53D-2DAB-42A0-8E3E-525F45FB3BF7%7D 80 - 172.18.175.126 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/117.0.0.0+Safari/537.36 https://xmcloudcm.localhost/sitecore/shell/applications/install/dialogs/Upload%20Package/UploadPackage2.aspx?di=%7B0226A53D-2DAB-42A0-8E3E-525F45FB3BF7%7D 413 1 0 9
The numbers at the end of this IIS log entry (413 1) indicate that IIS returned an HTTP 413.1 Request Entity Too Large error code to the browser. The Sitecore Install Wizard, however, did not report that to me and let me watch the spinner forever.
The default Sitecore configuration does not allow uploading packages larger than 512MB (<httpRuntime maxRequestLength="512000" />
).
When you are faced with this task, you have three main options:
- Split the large package into smaller packages.
- Increase the
maxRequestLength
andmaxAllowedContentLength
in theweb.config
file. - Manually copy the package file into the Content Management server
/App_Data/packages
folder.
This blog post focuses on the manual copy option when running Sitecore on Docker.
Prerequisites
-
Ensure your CM Docker Compose service uses the
Development.ps1
PowerShell script as itsentrypoint
, similar to this:cm: entrypoint: powershell -Command "& C:/tools/entrypoints/iis/Development.ps1"
-
Ensure that your CM Docker Compose service has a volume mounted to deploy files to its web root, similar to this:
cm: volumes: - ${LOCAL_DEPLOY_PATH}\platform:C:\deploy
Manually Upload the Sitecore Install Package
- Resolve the path to the
\platform
folder on your host by replacing the environment variable with its value. e.g.: For me, it resolved toC:\projects\<ProjectName>\docker\deploy\platform
. - In this
\platform
folder, create the\App_Data\packages
subfolders. - In the
\packages
folder, paste your large Sitecore Install Package file.- The
Development.ps1
Docker container entrypoint will copy the file from the containerC:\deploy
folder to the/App_Data/packages
subfolder of the web root inside the container.
- The
Voila! Your package is uploaded, and you can now select it from the Sitecore Installation Wizard.