We have encountered this error screen the other day with Sitecore 10 just by clicking on items in content tree in Sitecore Content Editor:

Error message:
![]() | The elastic pool has reached its storage limit. The storage usage for the elastic pool cannot exceed (51200) MBs. |
When I hit the Detail button, I saw this nice little YSOD (yellow screen of death):

Error message textually:
Server Error in '/' Application.
The elastic pool has reached its storage limit. The storage usage for the elastic pool cannot exceed (51200) MBs.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: The elastic pool has reached its storage limit. The storage usage for the elastic pool cannot exceed (51200) MBs.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): The elastic pool has reached its storage limit. The storage usage for the elastic pool cannot exceed (51200) MBs.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +277
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +765
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4616
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +513
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +3382
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +707
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +540
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +391
Sitecore.Data.DataProviders.Sql.DataProviderCommand.ExecuteNonQuery() +78
[DataException: Error executing SQL command: UPDATE [ClientData]
SET [Data] = @data,
[Accessed] = @now
WHERE [SessionKey] = @sessionKey]
[Exception: The elastic pool has reached its storage limit. The storage usage for the elastic pool cannot exceed (51200) MBs.]
Sitecore.Data.DataProviders.Sql.DataProviderCommand.ExecuteNonQuery() +292
Sitecore.Data.DataProviders.Sql.<>c__DisplayClass33_0.<Execute>b__0() +73
Sitecore.Data.DataProviders.NullRetryer.Execute(Func`1 action, Action recover) +290
Sitecore.Data.SqlServer.SqlServerClientDataStore.SaveData(String key, String data) +319
Sitecore.Configuration.ClientDataStore.SaveViewstate(String key, String value) +193
Sitecore.Web.UI.Sheer.ClientPage.SavePageState(String pageKey, Object viewState, String controlTree) +327
Sitecore.Web.UI.Sheer.ClientPage.SavePageStateToPersistenceMedium(Object viewState) +249
System.Web.UI.Page.SaveAllState() +1179
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8582
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4494.0
Solution
I was looking for a solution and found out that shrinking the database might help us immediately.
Shrinking of database is operation which releases allocated space so we give it a go…
We have run similar command on SQL Server:
DBCC SHRINKDATABASE ('DB-Name', 10);
First parameter is database name and second is target percent. Target percent is the percentage of free space that you want left in the database file after the database has been shrunk.
After we did this, DevOps looked into some backups and deleted some old ones (that were not necessary anymore) to free up additional space… So maybe also look this direction at first place π


