sudden crash

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
good day
suddenly my website crashed
it gave me the following

Server Error in '/app' Application.

Could not allocate space for object 'dbo.Customer'.'PK__Customer__3214EC072E3BD7D3' in database 'gfadel' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

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: Could not allocate space for object 'dbo.Customer'.'PK__Customer__3214EC072E3BD7D3' in database 'gfadel' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

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): Could not allocate space for object 'dbo.Customer'.'PK__Customer__3214EC072E3BD7D3' in database 'gfadel' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2062078
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5050204
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
   System.Data.SqlClient.SqlDataReader.get_MetaData() +86
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +311
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
   System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +10
   System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues) +8158468
   System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) +267

[UpdateException: An error occurred while updating the entries. See the inner exception for details.]
   System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) +389
   System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache) +163
   System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options) +609
   System.Data.Entity.Internal.InternalContext.SaveChanges() +120

[DbUpdateException: An error occurred while updating the entries. See the inner exception for details.]
   System.Data.Entity.Internal.InternalContext.SaveChanges() +206
   System.Data.Entity.Internal.LazyInternalContext.SaveChanges() +24
   System.Data.Entity.DbContext.SaveChanges() +20
   Nop.Data.EfRepository`1.Insert(T entity) in f:\Own\NopCommerce\Sources\src\Libraries\Nop.Data\EfRepository.cs:41
   Nop.Services.Customers.CustomerService.InsertGuestCustomer() in f:\Own\NopCommerce\Sources\src\Libraries\Nop.Services\Customers\CustomerService.cs:662
   Nop.Web.Framework.WebWorkContext.GetCurrentCustomer() in f:\Own\NopCommerce\Sources\src\Presentation\Nop.Web.Framework\WebWorkContext.cs:121
   Nop.Web.Framework.WebWorkContext.get_CurrentCustomer() in f:\Own\NopCommerce\Sources\src\Presentation\Nop.Web.Framework\WebWorkContext.cs:189
   Nop.Web.MvcApplication.SetWorkingCulture() in f:\Own\NopCommerce\Sources\src\Presentation\Nop.Web\Global.asax.cs:190
   Nop.Web.MvcApplication.Application_AuthenticateRequest(Object sender, EventArgs e) in f:\Own\NopCommerce\Sources\src\Presentation\Nop.Web\Global.asax.cs:133
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
12 years ago
Try executing the following SQL statement over your database:
DBCC SHRINKDATABASE('your_db_name_here')
GO
12 years ago
User 'username' does not have permission to run DBCC shrinkdatabase for database 'DB'
12 years ago
Just ask your hosting company to execute it for you
12 years ago
If not that, then you at least need more disk space.
10 years ago
Hello, in case anybody arrives here and may find this note useful, I have stomped on this problem too. I have installed some small websites on some hosting plans where the database is capped at 100MB. The database was almost full (some 90MB) and running the following query as suggested above...

DBCC SHRINKDATABASE('your_db_name_here')
GO

...did not succeed due to the lack of available space.

Then I noticed that the Customer table was full with temporary guest users which weren't needed any more (I don't know why they didn't get erased after they expired, but whatever, my pre-3.0 installations are about to go away in a few days, moving them all to 3.0).

After having noticed that, I ran this query:

DELETE FROM Customer WHERE Username IS NULL

This got rid of all the guest records and the database size dropped from 90MB to 50MB, enough to let it run some further days before migrating it.

Hope that helps whoever may need it.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.