Zen Cart Logo
Forums / General Questions / GAAAAK! What is this error?

GAAAAK! What is this error?

Views: 1,003

Results 1 to 6 of 6
16 Feb 2015, 2:30 AM
#1
phil_soth avatar

phil_soth

Zen Follower

Join Date:
Sep 2013
Location:
Warren, Oregon
Posts:
117
Plugin Contributions:
0

GAAAAK! What is this error?

Recently, I had a problem with emails, and DrByte turned me on to a solution ( (showthread.php?216207-Email-Notification-Not-Working-All-Of-A-Sudden). Included in the interchange was a query as to whether I had looked at my error logs. Well, quite frankly I had not been looking at them....Zen Cart has been running seemingly flawlessly and until the email issue I had no reason to even look for errors (my bad).

Well, an error has been popping up randomly until about 4 days ago, when it has been posting at least once a day. The size is 79,314, and begins with the following...I won't post the entire error here, as it is very large and seems to be repetitious...

[14-Feb-2015 08:20:29 UTC] PHP Fatal error: 1062:Duplicate entry 'zc_d6616cb5f4c2cb55d422ea67feb723b0' for key 1 :: insert into db_cache set cache_entry_name = 'zc_d6616cb5f4c2cb55d422ea67feb723b0',
cache_data = 'YTo2NTI6e2k6MDthOjI6e3M6NjoiY2Zna2V5IjtzOjEwOiJTVE9SRV9OQU1FIjtzOjg6ImNmZ3ZhbHVlIjtzOjIwOiJIZWlybG9vbXMgVG8gQ2hlcmlzaCI7fWk6MTthOjI6e3M6NjoiY2Zna2V5IjtzOjExOiJTVE9SRV9PV05FUiI7czo4OiJjZmd2YWx1ZSI7czoxNzoiUGhpbCBhbmQgUGFtIFNvdGgiO31pOjI7YToyOntzOjY6ImNmZ2tleSI7czoyNzoiU1RPUkVfVEVQ0KIDUwMy00MTAtNTEzNiI7fWk6MTM7YToyOntzOjY6ImNmZ2tleSI7czoxMToiU0hPV19DT1VOVFMiO3M6ODoiY2ZndmFsdWUiO3M6NDoidHJ1ZSI7fWk6MTQ7YToyOntzOjY6ImNmZ2tleSI7czoxODoiVEFYX0RFQ0lNQUxfUExBQ0VTIjtzOjg6ImNmZ3ZhbHVlIjtzOjE6IjAiO31pOjE1O2E6Mjp7czo2OiJjZmdrZXkiO3M6MjI6IkRJU1BMQVlfUFJJQ0VfV0lUSF9UQVgiO3M6ODoiY2ZndmFsdWUiO3M6NToiZm

This is just 2 lines of the text file.....it goes on and on and on, but if it helps anyone to help me find a cure, I will post the entire message.

I am on v1.5.1, my php version is 5.3.10 and I currently have the following add-ons: CEON Manual Card, CEON URI Mapping (not operational), Column Layout Grid, COWOA, css3 buttons, Flexible Footer (not operational), Image Handler (not operational), Simple Google Analytics.

I would like to move to v1.5.4, but I would rather have a clean 1.5.1 install before I do so. Part of my process is to find someone to hold my hand while I upgrade, but that's a another story.

Please advise possible solutions to my error, and again, if I need to post the entire message I can do so.

Thanks for any help in solving this.

Phil

16 Feb 2015, 11:12 AM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,710
Plugin Contributions:
56

Re: GAAAAK! What is this error?

@kobra, that last link didn't work.

16 Feb 2015, 2:06 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: GAAAAK! What is this error?

There is a solution posted: http://www.zen-cart.com/showthread.php?205681-Done-v1-6-0-1062-Duplicate-entry-for-key-1-in-db_cache&p=1268675#post1268675

But for understanding, basically as lhungil and others have explained elsewhere, there is a race condition that exists in the file, basically one action starts a process that is again begun before the full process is complete the first time around. It's a nuissance, typically occurs when spiders are checking out the site (high load times), adds large sized error files, but the correction is basically provided in the above link, though might suggest reading back a bit for understanding.

16 Feb 2015, 11:13 PM
#5
phil_soth avatar

phil_soth

Zen Follower

Join Date:
Sep 2013
Location:
Warren, Oregon
Posts:
117
Plugin Contributions:
0

Re: GAAAAK! What is this error?

Thank you for the links to #244 and #245. I haven't made the code changes yet, as I am uncertain as to what needs to be changed as indicated in #245. Can you be a bit more specific, as I am far less experienced than most of you.

By the way, I did go back and read through all the threads associated with this issue. What a fascinating tale this is....I just wish I could be at your level of experience and do the analytics and test and debug and discuss all the bells and whistles like you all! I really admire you people for what you have done with Zen Cart!

Anyway, please advise on #245...what do I do?

Thanks,
Phil

17 Feb 2015, 3:14 PM
#6
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: GAAAAK! What is this error?

Phil Soth:

Thank you for the links to #244 and #245. I haven't made the code changes yet, as I am uncertain as to what needs to be changed as indicated in #245. Can you be a bit more specific, as I am far less experienced than most of you.

Load the file "includes/classes/cache.php" into a text editor (NOT MS NotePad)

Navigate to line#128, which should read:

$sql = "insert ignore into " . TABLE_DB_CACHE . " (cache_entry_name, cache_data, cache_entry_created) VALUES (:cachename, :cachedata, time() )";

Replace that line with:

$sql = "insert ignore into " . TABLE_DB_CACHE . " (cache_entry_name, cache_data, cache_entry_created) VALUES (:cachename, :cachedata, unix_timestamp() )";

Save the changes.

Phil Soth:

By the way, I did go back and read through all the threads associated with this issue. What a fascinating tale this is....

Yes, it has been a bit of along saga. That is the nature of intermittent type problems/bugs though.

Phil Soth:

I just wish I could be at your level of experience and do the analytics and test and debug and discuss all the bells and whistles like you all! I really admire you people for what you have done with Zen Cart!

None of us started with this experience. We've spent a lot of time, and made a lot of mistakes to get there, and we probably all started out by making 'small' changes by following step-by-step instructions.

Cheers
RodG