ERROR in connecting in database In general we get ERROR in connecting in database notice while using wordpress hosting. I am using hos...
ERROR in connecting in database
In general we get ERROR in connecting in database notice while using wordpress hosting. I am using hostgator as my host and most of the people get this msg.
Resource dcachesize Problem
This problem occur when your server resource is exhausted. The dentry and inode touching the hard limit of your server.What is dcachesize, dentry and inode ?
Each file in linux filesystem identified by inode not by filename.
To
assign filename to a file, a special files (named “directory”) are
used. Each directory contains a mapping “filename to inode”.
This
has an interesting outcome: you can have multiple filenames mapped to
same inode. They are called “hardlinks”. I want to express that there is
NO any main filename or main hardlink. All hardlink are equal to each
other.
Directoriy entries (those mappings) are
called “dentry” in kernel. There are a number of fields in it: filename,
starting inode, parent entry and so on.
Summarizing:
inode is an internal file identifier in filesystem, dentry is a kernel
struct glues together directory entry (filename, inode…) and kernel
bookkeeping.
Limit of Dcacheize
The 250,000 inodes limit is the true limit for VPS hosting in hostgator at VPS plan
dcachesize and inode are different, but you must look at your server usage report before taking any action by clicking on Resource alert tab available in VZcpanel of VPS hosting
The size of a file does not matter when calculating the inode usage.
The size of a file does not matter when calculating the inode usage.
However, any shared account using more than 20 gigs of disk space will be removed from our off site weekly backup, with the exception of Databases continuing to be backed up.
How inodes and dentry are being counted
1. Yes, each image is a unique inode. Each text document is also an inode.
2. you are more likely to get a 500 error before you use too many inodes. If you hit the inodes limit of 100,000, then hostgator remove you from our weekly backups list. If you go over the 250,000 inodes limit, then you risk suspension.
How to solve dcachesize Problem ?
Upgrading your account to a dedicatedserver will break your limits
Update 9/17/2017
- While talking to hostgator expert they have said the dcachesize is actually total cachesize of your website.
- So limiting the flush rate may solve the issue
dcachesize is sort of the same, its a limit on VPS packages thatâ‚â‚represents the maximum size of filesystem-related caches limit for my server, such as directory entry and inode caches.
So how to solve dcachesize the issue if you are using WPSUPERCACHE
Solution # 1
Expiry Time & Garbage Collection
The default setting will allow cache files to age 1 hour (3600 seconds) prior to being removed which is ideal. This setting can be increased for sites that do not have many posts (1,000 or less ) if you do not update your content often. If you have a very large amount of posts ( 25,000+ ), a lower setting around 1800 may be more viable to prevent stat/CPU issues due to the amount of files being created.
Resources
http://support.hostgator.com/articles/inode-limits
https://www.quora.com/What-is-the-relationship-between-inode-and-dentry-on-Linux-Systems
http://www.fieldses.org/~bfields/kernel/vfs.txt
https://www.hostgator.com/help/article/wp-super-cache-plugin
COMMENTS