Jump to content
Sign in to follow this  
ecuyetx

Cannot access Shop or CubeCart Admin

Recommended Posts

I loaded new images and a new inventory about 1 week ago. Everything was working but now without me doing anything I am now getting the following message :

Notice: `name` is not allowed as a key in 'CubeCart_config' table! in /var/www/vhosts/kbcoins.com/httpdocs/store/classes/db/database.class.php on line 943

Website is kbcoins.com. 

I cannot now access the shop from the entry pages of he website, and although I am getting the sign in page for the Admin control panel, when I put in the details it just comes back to the same page

Any ideas anyone?

Regards

Tony E.

Share this post


Link to post
Share on other sites

"All of a sudden, things are going wrong."

When that happens, we can place the blame 99% of the time on something your hosting provider did.

Fetching the 'config' out of the database is very nearly the first thing CubeCart does. So, when CubeCart reports this (unhelpful) error, it means that communication to your database has been lost. PHP and the database server can apparently talk to each other, log in the database user with password successfully, but after that, the database server isn't accepting any queries.

So, you may need to get the assistance of your hosting provider to have them determine, from the database server's point of view, what the problem may be.

Share this post


Link to post
Share on other sites
10 hours ago, bsmither said:

"All of a sudden, things are going wrong."

When that happens, we can place the blame 99% of the time on something your hosting provider did.

Fetching the 'config' out of the database is very nearly the first thing CubeCart does. So, when CubeCart reports this (unhelpful) error, it means that communication to your database has been lost. PHP and the database server can apparently talk to each other, log in the database user with password successfully, but after that, the database server isn't accepting any queries.

So, you may need to get the assistance of your hosting provider to have them determine, from the database server's point of view, what the problem may be.

Thanks bsmither I will contact the host now. Thanks again for your help. 

regards

Tony E.

Share this post


Link to post
Share on other sites

Hi

It turns out that it was a file limit breach. The Cache file in the Shop had over 4 million files in it, which seems a little crazy.

I have read up a little on this and it appears that because the cache is not being cleared in the way it used to, that some people are having problems with this. 

We have got unlimited space but it still appears there are problems with numbers of files, which I admit the hosts should not be hiding behind, but the caching of 4 million files does seem a bit extreme. I may do some more research and see if there are things I can do to stop this happening. 

Thanks again for your help

Regards

Tony E.

Share this post


Link to post
Share on other sites

That could be an operating system, file system limit. Not something that a server admin can adjust.

Would it be possible to determine what "kind" of files are predominant in the /cache/ folder?

Do all the files start with the same 5-character MD5 hash? (Derived from the name of your database.)

I would guess that the vast majority of files then have, after the initial hash, sql, which are cached results of database queries - the MD5 hash that follows being the query.

But each cache file has a 24-hour life span. If, when the specific cached file is read, the internal expiration time has passed, that cache file gets deleted and the SQL query is re-issued.

So, to have millions of SQL cache files, there would have to be millions of unique queries: either thousands and thousands and thousands of products and hundreds and hundreds of categories, and/or millions of search queries.

(As an aside, I can imagine how the CubeCart code would respond if a query could not be cached.)

Share this post


Link to post
Share on other sites

Hi

It would appear that the problem is happening again. I have tried using FileZilla to open the Cache folder to see what is in there and it will not open, times out.

I am now using Plesk File Manager and it just says "Please wait. loading …"  and it has been saying that for 5 minutes now. 

While I was writing this the Cache Folder has opened up on FileZilla. Interesting that there were only 89k files in the main Cache Directory.  All files were less than 24 hours old. 
I have added a snip of the top of the list of files in the Cache. 

In the end the Plesk File Manager came up with an error, which I have attached a snip of, which means nothing to me I am afraid. 

Tried to get back in to the Cache in FileZilla to see what else I could see but it is stuck again.

This is very odd indeed

regards

Tony E.

Cache-files1.PNG

Plesk-Error.PNG

Share this post


Link to post
Share on other sites

This problem has been reported by various people on certain hosting environments and I dont think a reason has been found - I havent spent any time looking into it as it doesnt happen on any of our servers so dont have direct access (nor to be honest the time or inclination to investigate what is probably a hosting mis-configuration).  Even on servers / accounts that use the standard file based caching, we dont get this but then almost all accounts across all our servers use either memcached or Redis for memory based caching which is MUCH faster and obviously doesnt suffer from inode limits (this is a trick many hosting company when they say "unlimited" space - which is rarely true anyway as always subject to "fair usage policies" - but then put a limit on the number of inodes available)

Share this post


Link to post
Share on other sites

So, setting a limit on 'inodes' is possible? (A search suggests, "The amount of inodes available on a system is decided upon creation of the partition. Either increase the capacity of the disk entirely, or re-format the disk using mkfs.ext4 -i to manually overwrite the bytes-per-inode ratio.")

I also see where a utility can enforce a soft and hard limit on the number of inodes in use. (But no description of what happens when the limit is hit.)

From the time gaps between groups of near-same-time cached files, it seems your site is getting hit hard with unique URLs or searches.

Did you mention how many products you have in your store?

You might look at your hosting control panel's site access activity log. Examine the URLs listed in an hour's worth of log. Your control panel may have a Stats utility.

Edited by bsmither

Share this post


Link to post
Share on other sites

The number of inodes is fixed at the time the partition is created but if you run a system such as Cloudlinux (which many hosting companies do and impose limits on all sorts of parameters such as memory usage, CPU usage, number of people connected to the account) then a limit on inodes is certainly possible and one that is often used

Share this post


Link to post
Share on other sites

My question is, to satisfy my curiosity, what happens when that manually set limit is reached? Bad things to the execution of the script (horrible way to enforce)? Or some kind of warning (controlled slowdown, error message that makes sense, etc)?

Share this post


Link to post
Share on other sites

I believe it is a hard limit as are the other account based limits that can be imposed by Cloudlinux - have never and will never use it

Share this post


Link to post
Share on other sites

So hitting the limit will, at worst, make a script misbehave in unplanned, uncatchable, and potentially devastating ways, or at best, simply crash the application.

Share this post


Link to post
Share on other sites

Yep quite probably !   Tactics employed by hosting companies that offer cheap hosting plans !  Nothing comes for free and the myth of "unlimited" hosting (for bandwidth or disk space which even then are governed by fair usage policies) is then protected by other more hidden limits like this

Share this post


Link to post
Share on other sites

So, again to satisfy my curiosity, if the number of inodes is a hard limit based on how large the partition is formatted, if the number files that a partition can hold - similar to a "disk full" situation - if exceeded, and not hitting an administrator-set soft limit, can cause the same results?

I would hope there would be a way for an in-your-face notice to warn of an impending depletion of resources - like an email.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...