Thursday, November 18, 2010

SharePoint wss_content log file keeps growing

The another day I received a request to check an issue with our production SharePoint Server 2010. The user could not save edited documents or upload documents to the library. Different error messages pop up. After further investigation, we found that the SharePoint database server is running out of disk space. The database file check showed that the largest data base is the wss_content (Of course, it's the SharePoint content DB).  Surprisingly, the log file wss_content.ldf had triple size of wss_content.mdf.

So we backed up the log file and then shrink the log file to get back lots of space. Then the problem was gone. Meanwhile, we limited the wss_content.ldf  to a fixed size to avoid this growth.

However, one month later, the problem reoccurs again. And if you check the serer log, you will find following error
 
Unknown SQL Exception 9002 occurred. Additional error information from SQL Server is included below.
The transaction log for database 'WSS_Content' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
 

We have to repeat the log backup to get back space. At the same time, we do more check on the database recovery mode configuration and find it's "Full" mode, that means, the log file will keep growing and once it's up to the throttle, it  will require the log backup. This is mandatory task because the "Full Recovery Mode" means, you can recover your database to an arbitrary point in time, which is based on the transactions in the database log file.

So if you don't want this point-to-time recovery possibility (maybe you already has backup plane for your database), you can just switch back the content db recovery mode to "Simple".

More information about More information of SQL Server, you can find here:

Recovery Model Overview

1 comment: