Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nelson 94 posts 246 karma points
    Sep 28, 2016 @ 06:41
    Nelson
    0

    PRIMARY filegroup is full

    Hello guys, I was updating my website and I get the following error:

    An error occurred

    Could not allocate space for object 'dbo.cmsPropertyData'.'PK_cmsPropertyData' in database 'MSLGROUPChina' 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.

    EXCEPTION DETAILS:

    System.Data.SqlClient.SqlException: Could not allocate space for object 'dbo.cmsPropertyData'.'PK_cmsPropertyData' in database 'MSLGROUPChina' 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.

    Is there anything I can do or I need to contact the hosting server to fix the issue? I just uploaded the database to the server and I'm not able to do any modifications on the server besides restoring or backing up the database.

    Thank you very much!

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Sep 28, 2016 @ 08:16
    Nik
    0

    I think you probably need to contact the hosting providers. This error makes me thing the SQL server has run out of disk space.

  • Nelson 94 posts 246 karma points
    Sep 28, 2016 @ 08:25
    Nelson
    0

    I checked the database status on the control panel of the server, and it seems the database data is less than 100mb, so found it really weird that the disk is already full.

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Sep 28, 2016 @ 08:28
    Nik
    0

    Hi Nelson,

    You're database may be that size, but I would be surprised if you are the only database on their server. Also, they may have limited the size of your database as well, it's hard to say.

  • Alex Skrypnyk 6175 posts 24176 karma points MVP 8x admin c-trib
    Jul 19, 2017 @ 10:56
    Alex Skrypnyk
    0

    Hi Guys

    We have the same error

    Could not allocate space for object 'dbo.cmsPropertyData'.'PK_cmsPropertyData' in database 'dk_db' 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.
    

    We see it only when try to save some nodes, only one docType, thats why I don't think that it's not hosting problem, what other reason can cause this problem?

    Umbraco v6.2.4 (Assembly version: 1.0.5394.15649)

    Thanks,

    Alex

  • Alex Skrypnyk 6175 posts 24176 karma points MVP 8x admin c-trib
    Jul 19, 2017 @ 11:28
    Alex Skrypnyk
    100

    This sql query fixed problem for me:

    https://gist.github.com/dampee/a8ead728165b16d49c00

    -- Umbraco Clear Old Document Versions To Decrease Database Size And Improve Performance
        -- http://borism.net/2008/12/16/fixing-a-large-cmspropertydata-table-in-umbraco/
        DECLARE @createdDate Datetime = DATEADD(m, -1, getdate())
    
        -- dump logs
        -- TRUNCATE TABLE umbracolog -- faster if log table is very big and you don't need anything
        DELETE FROM umbracolog WHERE Datestamp < @createdDate
    
        -- clean up old versions
        DELETE FROM cmsPropertyData WHERE
            versionId NOT IN (SELECT versionId FROM cmsDocument WHERE updateDate > @createdDate OR published = 1 OR newest = 1) AND
            contentNodeId IN (SELECT DISTINCT nodeID FROM cmsDocument)
        DELETE FROM cmsPreviewXml WHERE
            versionId NOT IN (SELECT versionId FROM cmsDocument WHERE updateDate > @createdDate OR published = 1 OR newest = 1) AND
            nodeId IN (SELECT DISTINCT nodeID FROM cmsDocument)
        DELETE FROM cmsContentVersion WHERE
            versionId NOT IN (SELECT versionId FROM cmsDocument WHERE updateDate > @createdDate OR published = 1 OR newest = 1) AND
            ContentId  IN (SELECT DISTINCT nodeID FROM cmsDocument)
        DELETE FROM cmsDocument WHERE
            versionId NOT IN (SELECT versionId FROM cmsDocument WHERE updateDate > @createdDate OR published = 1 OR newest = 1) AND
            nodeId IN (SELECT DISTINCT nodeID FROM cmsDocument)
    
        --http://blog.dampee.be/post/2015/11/28/Remove-Old-versions-of-Umbraco-Previews.aspx
        delete
        --select *
        from cmsPreviewXml
        where versionId in (
            select cmsPreviewXml.versionId
            from cmsPreviewXml join cmsDocument on cmsPreviewXml.versionId=cmsDocument.versionId
        where cmsDocument.newest <> 1)
    
  • John Bergman 483 posts 1132 karma points
    Jul 19, 2017 @ 21:25
    John Bergman
    0

    Are you using SQLCE, or did this happen with regular SQL Server?

  • Alex Skrypnyk 6175 posts 24176 karma points MVP 8x admin c-trib
    Jul 19, 2017 @ 21:51
    Alex Skrypnyk
    0

    Hi John

    It happened with regular SQL Server, when db size is over hosting limit. SQLCE is safer in this scenario I think, and it's easier to fix - just remove some old files :)

    Thanks,

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft