weird problem

Permalink 2 users found helpful
Lately i'am having a weird problem regarding my website. Every morning my website crashes. Simple pages work perfect but pages with child pages are down. When i click them i receive the following message:
"An unexpected error occurred.
A database error occurred while processing this request"
when this happen i cannnot access the dashbord. I found a temp fix by deleting the cache files in cache folder and cache-objects but this is a temp fix because next day i have to start over. It really annoys me.
After clearing the cache i've studied the logs in my dashbord and this poped out:
"Exception Occurred: mysql error: [-32000: Cache write error] in CacheExecute(/home/sites/domain.com/public_html/files/cache/adodb_6afa56d0ccaeb026023e216efd4ea337.cache, select cParentID from Pages where cID = '55')

#0 /home/sites/domain.com/public_html/concrete/libraries/3rdparty/adodb/adodb.inc.php(1819): adodb_throw('mysql', 'CacheExecute', -32000, 'Cache write err...', '/home/sites/dom...', 'select cParentI...', Object(ADODB_mysql))
#1 /home/sites/domain.com/public_html/concrete/libraries/database.php(34): ADOConnection->CacheExecute(10, 'select cParentI...')
#2 /home/sites/domain.com/public_html/concrete/blocks/autonav/controller.php(597): Database->querycache(10, 'select cParentI...')
#3 /home/sites/domain.com/public_html/concrete/blocks/autonav/controller.php(392): AutonavBlockController->populateParentIDArray('55')
#4 /home/sites/domain.com/public_html/concrete/blocks/autonav/controller.php(298): AutonavBlockController->getParentAtLevel(2)
#5 /home/sites/domain.com/public_html/concrete/blocks/autonav/view.php(3): AutonavBlockController->generateNav()
#6 /home/sites/domain.com/public_html/concrete/libraries/block_view.php(254): include('/home/sites/dom...')
#7 /home/sites/domain.com/public_html/concrete/models/area.php(354): BlockView->render(Object(Block))
#8 /home/sites/domain.com/public_html/concrete/themes/default/left_sidebar.php(10): Area->display(Object(Page))
#9 /home/sites/domain.com/public_html/concrete/libraries/view.php(736): include('/home/sites/dom...')
#10 /home/sites/domain.com/public_html/concrete/dispatcher.php(196): View->render(Object(Page))
#11 /home/sites/domain.com/public_html/index.php(2): require('/home/sites/dom...')
#12 {main}
"

everything else worked with a small exceptions before that, but still i did not have any major problems with concrete.
Does anybody have any idea about how to fix this ?

i've tried to disable the cache but this is not working, the cache folder has files in it next day.

 
kchilds replied on at Permalink Reply
kchilds
I have had similar problems. Would love to have a fix to this. I am running Concrete 5 through a C-Panel using MYSQL. I am having daily problems with on again/off again lag and several days where I receive errors regarding being unable to connect to the data base or 404 errors.
Karen Childs
Remo replied on at Permalink Reply
Remo
This looks like the adodb cache, not the cache for c5 Andrew wrote.

It's a bit tricky to help you since I never had this problem, but here's where I'd start looking for a solution.

On this site:
http://phplens.com/lens/adodb/docs-adodb.htm...
you find a few information about adodb, including this
$db->cacheSsecs = 30;


set it to zero and it would disable the adodb cache (I haven't found a better method browsing through their documentation)..

Does the file you see in the error message in the cache directory? It's possible that the c5 cache is able to write to this directory, but the adodb cache not..
lexteo replied on at Permalink Reply
Thank you remo, i will study the documentation but the thing is: the website worked perfectly till last week with no glitch. Then this thing started, after that i also discovered some strange things like the maintenance not being able to write to google sitemap file because of changed file permission.
I think i will take a look at how to backup and reinstall the whole site.
lexteo replied on at Permalink Reply
After studying this behavior one more time i decided to switch the website in development mode and see what happens. When i got the message next day i know something is definitly weird with file permissions and i checked files/cache permission once again.
The files/cache folder itself is 777, but the files inside are not, after making them 777 the site was loading perfect.
I don't know why this happens but this is very weird.
I hope this will solve my problem.
lexteo replied on at Permalink Reply
When i checked my website this morning i though i finally managed to solve my problem. But i was wrong. Changing the file permissions for the adodb file in cache folder only solved the problem for files that were created before i actually done this. So this is pretty messed up and i think there is a bug out there.
I checked the log and this is one of the entry i found:
"Exception Occurred: mysql error: [-32000: Cache write error] in CacheExecute(/home/sites/domain_name.com/public_html/files/cache/adodb_95824454f7fed8ae9098ece832ad1a49.cache, select cParentID from Pages where cID = '116')"
If I check for the file that it says here the file is 644 insted of 777 or 666 which work also as i discovered.
Can someone check if this is a bug, because franky it drives me nuts.
Remo replied on at Permalink Reply
Remo
how should we check if this is a bug??

No one is able to reproduce this so far...

You probably need to dig around the code yourself, check chmod on files/directory, create some code that writes a file, try to read it, debug the code etc. etc...
lexteo replied on at Permalink Reply
files and config folders all are chmod 777
files/cache folder is 777 also
files in cache folder are 644 when created.
folders in files/ are all 755 except cache folder

This problem that i am speaking about was discussed here also:
"http://www.concrete5.org/community/forums/customizing_c5/fatal_error_all_of_a_sudden#15233"

the facts are:
- every morning i receive this message only when accessing pages that have child pages:
"An unexpected error occurred.
A database error occurred while processing this request"

- if i delete the files/cache folder everything is ok until next day
-if i chmod the files within files/cache folder to 777 or 666 i have no problem for the pages already created even if 2 days pass. But for new pages created during the day i receive the same message next day.
-Dashboard is not accessible until i do one of the things above
-This error occurs every night between 2 - 6 in the morning, randomly.
-The log in C5 contains what i wrote earlier in this thread.
-Disable C5 cache does not work because this is about adodb cache not c5 cache.
-i did not mess with files chmod except files/cache folder and files/cache-objects

What i don't understand is why the whole thing works during the day and next day it crashes.
If i was able to reproduce this at any given time i would have been able to solve this myself, but this thing only occurs at night and i don't know what it causing it yet!
Remo replied on at Permalink Reply
Remo
but as I said, I'm not having "the idea". There are just a bunch of things I'd try.. The things I've listed above.

I'm sorry, I can't help you more with that!

Why didn't you just disable the adodb cache? CacheExecute checks for the number of seconds.. This should work!
lexteo replied on at Permalink Reply
I've only found this $secs2cache in files related to adodb in concrete5, i don't know whether this is what i should set to zero, because this is already set in some places to $secs2cache=0. This is why i did not change what you told me.
ayyurek replied on at Permalink Reply
Today was first day I installed a live site based on C5, I lived exactly the same problem. Problem about both cache and db cache. It was even impossible to reach the administration. What I did was, adding two parameters to the site.php which is located in the config folder. (in the root, not in the concrete).

define('ENABLE_CACHE', false);
define('DB_USE_CACHE', false);

After that it worked. But of course without any caching =)

Maybe it can help people, who will have the same problem and need quick temporary solution.
lexteo replied on at Permalink Reply
I will try this method when this will happen again. I still think that this is not related to c5 in any way, but rather to my hosting company, because this happens only at certain time expecially at night :(. So I must digg more before finding out the problem.
lexteo replied on at Permalink Reply
you only need the second line
define("DB_USE_CACHE',false");
because only adodb is the one that produce the problem.
Using this solves the problem.
djes replied on at Permalink Reply
djes
Found that speed is better without adodb cache, and I haven't anymore 'not fully loaded' page errors.
meffid replied on at Permalink Reply
would you edit this setting please?

(the cache setting to zero I mean)
lexteo replied on at Permalink Reply
What file are you reffering to, problem was solved by setting DB_USE_CACHE to false in site.php!
Is there another way to solve this problem ?
nige replied on at Permalink Reply
nige
and Ive just fixed it with the

define('DB_USE_CACHE', false); thing in site.php.

Unfortunately although my site is working without the db errors, despite being logged in I can no longer see the concrete toolbar at the top of the page. Ive logged out and back in but it seems to have disappeared.3

Does anybody know why this has happened and if this "fix" causes other problems.

Also is this something that needs to be included in every site.php?

Seems quite important.

Nige
nige replied on at Permalink Reply
nige
cleared cache and its come back
NUL76 replied on at Permalink Reply
NUL76
I've fixed this problem by raising the allowed disk limit in the directadmin for a webpage. Seemed it was at his max, so couldn't write the cache anymore.

Maybe a solutions for some?
mobius2000 replied on at Permalink Reply
I am getting the same error message occasionally, every other time I just get a page not found error when clicking on Dashboard.

I have tried the define('DB_USE_CACHE', 'false'); option and still no luck (even after clearing FF's cache).

My issue seems to be identical to this one however the reported solutions don't seem to be working.

Does anyone have any pointers as to what I am doing wrong here? I am pretty inexperienced when it comes to playing with databases. :-(
watersedge replied on at Permalink Reply
I know it's been a while since you posted, but I'm wondering if you can expound on this. I'm getting this message (A database error occurred while processing this request.) that just started all of the sudden. If I shift-refresh sometimes the page comes up, but I cannot edit it.

I have a substantial amount of large files in this site. The hosting account (at bluehost) allows unlimited space so I wouldn't think this is a problem. But I'm wondering what you mean by raising the allowed disk limit for a web page.

Anything would help.
http://www.webctest.org
mobius2000 replied on at Permalink Reply
Hi Watersedge... I am too new at server issues to be able to offer any solid pointers but my issue was resolved by my host (my issue at least seemed to be the same as above though I may be wrong).

I contacted my host, they confirmed that changes had been made to the server I was on but couldn't confirm if that was the issue, about 2 weeks later it was resolved, as it turns out thousands of their clients had the same issues with other CMS's and a like and they had to fix their mistake.

Again, this may have nothing at all to do with your problem so please don't attack your host due to my experience but maybe a call to them to find out if they have made any changes to the servers in the last week or two.

NOTE: I stress, this was just my experience and I am a complete n00b when it comes to this stuff.
watersedge replied on at Permalink Reply
Thank you. I actually just put a ticket in to bluehost on the hopes that they could come up with something. If nothing else, you've raised my hopes. It's weird because everything was fine until tonight about an hour in to working on the site. I'll post what they say. Thanks!
nteaviation replied on at Permalink Reply
nteaviation
Just a thought. Are you running any php scripts in a cron job? If you are, running a php script as a normal user as opposed to the apache user may cause permissions issues (the PHP CLI may create files that mod-php5 may not like, and vice-versa). What are the Owner/Group/Permissions of the cache file it "chokes" on? Does the apache user have the proper permissions for that cache file?
watersedge replied on at Permalink Reply
Ha! Your questions make me wonder what I'm doing using Concrete5! I say that humorously, as I'm not a programmer though I am a web designer with some development skills. This is my first CMS. I had to look up what a cron job was. I'm not running one, but is it possible that the host company is doing something that conflicts?

It chokes on pretty much all files. I changed the cache folder inside the files folder to be 777. Doesn't really help. Not sure about your apache question. Sorry I'm not as techno savvy as is required for this stuff.
nteaviation replied on at Permalink Reply
nteaviation
I run a bluehost shared site and not seen anything like this, but our site is not very big.

Maybe you are hitting a quota limit and bluehost just needs to fix it.

If it is a qouta limit issue, I don't understand why we are not seeing 2 errors, one when we attempt to write the file and then the one we are seeing when we try to read it. You don't see anything interesting in your raw logs do you?
watersedge replied on at Permalink Reply
Thank you for your suggestion to look in the log files. I first went into the error.log and found many many of the same error where Simplecast was looking for a feed that could not be found. I had been putting an RSS feed link onto the media page, and had initially put in the wrong URL. I changed it but it still apparently had the bogus info. THIS made the entire site freak out! I had no idea until I viewed that log. Then I was able after many reloads to get into the media page and completely delete the offending block (which looked perfectly harmless). Now it runs smooth as silk. Wow! Unless Bluehost has stepped in and done something and not yet told me, that really seems to be the problem (and resolution). Thank you one and all for you help!
nteaviation replied on at Permalink Reply
nteaviation
Excellent! I'm always glad to help. Good catch :)
odegadk replied on at Permalink Reply
odegadk
Hey guys, I just had this problem and tried everything you all mentiond and none of it worked. I went back and looked at the site.php file and noticed that the database password was changed by one character. I am hosting with bluehost and now I wonder how this got changed. Anyone else with this issue should double check their db password.