April 29, 2014

Few days back I ran into a issue where my website failed with the message that

  1. {System.Data.SqlClient.SqlException (0x80131904): Could not allocate space for object 'dbo.Table1'.'PK_TableID' in database 'TestDB' 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.
  2. Uncommittable transaction is detected at the end of the batch. The transaction is rolled back.

 

Initially I thought the database was out space but then it sounded strange as I was not expecting the database to run out of space. After checking the database space I noticed that it only had a few MBs of data remaining for the primary while the log file had a huge data capacity. To fix the issue, update the max size of the database so it can save the data. Also, make sure the server has sufficient space to cater for the increased space.

However, sooner or later you are going to run out of space and therefore it's a good idea to increase the max size to unlimited but you need to make sure the server can cater for it.

0 comments:

Reference: Shahed Kazi at AspNetify.com