Zen Cart Logo
Forums / General Questions / ERROR message help 1062 Duplicate entry for key 1 in db_cache

ERROR message help 1062 Duplicate entry for key 1 in db_cache

Views: 1,644

Results 1 to 5 of 5
26 Aug 2012, 4:37 PM
#1
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

ERROR message help 1062 Duplicate entry for key 1 in db_cache

I just checked my cache file and found a log file that is rather large, 120,138 bytes. It is a Fatal Error 1062 duplicate entry for the cache file:

[26-Aug-2012 13:43:04 UTC] PHP Fatal error:  1062:Duplicate entry 'zc_dXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' for key 1 :: insert into db_cache set cache_entry_name = 'zc_dXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
                                                 cache_data = ' too much data to input, the forum refused to post it or upload it in any form '
                   cache_entry_created = '1345988584' in /home/www/XXXXXX/zen-cart/includes/classes/db/mysql/query_factory.php on line 101

I looked at similar threads and could see one that might address my issue because they are all from several years ago and both zen-cart and the MySQL/PHP have been upgraded. I don't want to risk further damage by trying to fix it without asking for help first.

I do not know what triggered it as I was not online when it happened.

Any ideas on how to fix it? I'm also getting reports from my hosting company that the CPU usage is way too high, could this be related?:lookaroun

Blessings,
Krisann

##########################################################################################
Pertinent Details

Zen Cart 1.5.0
Database Patch Level: 1.5.0
v1.5.0 [2012-08-13 12:56:00] (Version Update 1.3.9->1.5.0)
v1.3.9h [2011-10-12 22:06:48] (Fresh Installation)

Server OS: Linux 2.6.30.1-3.AM_64
Database: MySQL 5.0.51a-24-log
HTTP Server: Apache/2.2.11
PHP Version: 5.3.9 (Zend: 2.3.0)
PHP Memory Limit: 64M
PHP Safe Mode: Off
PHP File Uploads: On

Currently installed mods:

Admin Display Product Catalog Thumb
Admin_Login_As_Customer_v3.0_For_ZCv150
Admin Notes Advanced
Admin Change PW Display
Admin sort order alpha
Backup MySQL plugin v5
Backup Zencart v1
Confirm Email Address 1.3a
Contact Us- add subject
contest system 1
Define Pages- shopping cart
Dynamic Filter (not working 100% due to required change in /incl/fun/functions_general.php)
Easy Attributes 1.3.91.5.0
edit_orders_v4.0.2
Email for 404 v122
Fast Easy Checkout 1.5.0
Image Handler 4
Mailchimp 3.0
Multi Cross Sell
newsletter_discount_3.0
Piccadilly_Posh (template)
Recover Cart Sales
Rewards Points Full Suite 2.1.b
Save Sideboxes Layout

Edited Admin Sort Order: Alpha

Bug Fixes applied:
Current Categories incorrect when copying a product
Customer authorization e-mail not sent out on pressing "the red button".
extra closing head in admin profiles.php (changed to </thead>)
Incorrect database constant used in tpl_account_default.php
PayPal has unexpectedly returned a blank address
PHP Warning: strlen() expects parameter 1 to be string
popup_search_help popup missing [close] link
Zen_back_link bug fix

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

26 Aug 2012, 7:35 PM
#2
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: ERROR message help 1062 Duplicate entry for key 1 in db_cache

Thank you to whomever moved this to it's own thread. :smile: I wasn't sure where to post it.

shartlesville:

I looked at similar threads and could see one that might address my issue because they are all from several years ago and both zen-cart and the MySQL/PHP have been upgraded. I don't want to risk further damage by trying to fix it without asking for help first.

That should read "could NOT find one".

Thank you for any assistance!

Blessings,
Krisann

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

28 Aug 2012, 5:58 AM
#3
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: ERROR message help 1062 Duplicate entry for key 1 in db_cache

I still don't know what exactly happened or why. What I did to prevent it from throwing another error was change the cache from database to file in both configure.php files. I have a cached copy in the folder that keeps disappearing and reappearing; not sure if that is how it should work but I haven't had it throw another error so far. Of course I have no idea if the file in the cache folder is actually of any use either, lol.

Blessings,
Krisann

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

28 Aug 2012, 6:31 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: ERROR message help 1062 Duplicate entry for key 1 in db_cache

When you had it set to database, it only ever happened once, right?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Aug 2012, 2:21 AM
#5
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: ERROR message help 1062 Duplicate entry for key 1 in db_cache

Yes. But that is possibly because I went in and changed it to "file" :P :blink:

Should I change it back? Does it matter? Is one better/faster/ etc?

Thank you!

Blessings,
Krisann

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;