|
This document contains troubleshooting tips for the situation where you've successfully installed Discus, you've been using it for some time, and suddenly you start to get a "File Locking Error" message. Note: If you've just installed Discus and you have never successfully accessed your board, you need this document that describes a file locking error when first setting up the board.
Occasional "File Locking Error" messages
If the File Locking Error occurs only occasionally, it is likely that normal board use is causing the file locking mechanism to do exactly what it's designed to do - prevent two processes from simultaneously accessing the same file and thereby corrupting it. Generally, reloading the page where the file locking error message was displayed will allow the action to continue.
Here are some tips to avoid the occasional file locking error:
-
Use the MySQL database features of Discus 4.0 and higher. When the database is used, it is not necessary to lock the user or moderator password file when updating last access times or other account data. The users.txt/passwd.txt files are among the files that are most commonly "locked" when this error occurs.
-
Make sure you have the "template cache" option enabled. In advanced mode of the Options Manager, go to the "Other" tab and scroll to the bottom section. Make sure this box is checked:
[x] Templates: Cache templates for better performance (requires more disk space)
-
Make sure you are using the latest available version of Discus. Various changes in the beta and official releases of Discus 4.0 have improved efficiency thereby reducing the chances of a file locking error. If you are not running the current release, you should upgrade.
-
If the errors occur on files entitled ##-tree.txt (e.g. 24-tree.txt) during posting, the organization of your board may not be optimal. When possible, you should separate any archives into separate topics, rather than leaving inactive content in the same topic as active content. This causes the data to be stored in files and directories separate from your active content, reducing the work of the server when updating those files. This organizational efficiency makes the server run faster, and thus decreases the likelihood that the same file will be accessed at exactly the same time.
File Locking Errors on nearly everything
If you get a "File Locking Error" on nearly everything you try to do (including an error on tree.txt as you try to access the discus.cgi script), it is likely that file locking is malfunctioning. Since your board was working correctly before, this indicates that some kind of change has occurred that now breaks file locking.
Here are some tips to resolve a persistent file locking error:
-
Check your errors.txt file, in your Discus administration directory (typically named something like discus_admin_23498234). Whenever a file locking error occurs, Discus writes a message to that file. You may see something useful that explains why Discus could not create a directory. This message may correspond to one of the situations listed below.
-
Check your disk quota. When MySQL is not enabled, Discus creates a file lock by making a directory under the "locks" directory of your administration directory. If your disk quota is exceeded, it may be prevented from creating that directory, hence causing an error. Note that this might not be recorded in errors.txt if the disk is completely full, because space will not allow for it to be recorded. In addition to your own disk quota, have the web host check the physical disk where your board is running to see if the physical disk is full, even though you are below your quota.
-
Check permissions on the "locks" directory. If you're on a unix server, make sure permissions on "locks" are still 0777 (rwxrwxrwx). If you're on a Windows server, the permissions you see through the FTP program are meaningless.
If you suspect a permissions problem, the document on the File Locking Error upon setting up the board contains permissions instructions for both unix and Windows servers.
|