Totally Zenned
- Join Date:
- Jul 2012
- Posts:
- 16,908
- Plugin Contributions:
- 2
[Done v1.6.0] 1062:Duplicate entry for key 1 in db_cache
On V1.5.0 which was updated 2012-02-06 from freshly installed Version 1.3.9h (2011-12-18). Have multiple mods installed, only recently changed the cache from none to file for a few days, but then read up on the deprecation of the file option, so changed to database. It wasn't until I had installed one of the mods that allowed me to review the logs inside the cache folder that I too observed this issue. In my searches for resolution I tried to chase backwards what event was causing this error; however, I have not coded in anything to catch more detail when this error is logged. Review of server logs for yesterday where I had 11 instances of the the following summarized error: PHP Fatal error: 1062:Duplicate entry 'zc_xxxx' for key 'PRIMARY' :: insert into znc_db_cache set cache_entry_name = 'zc_xxxx' (Where xxxx is a 32 character length field).
I hadn't seen if there was a solution to be offered (if it is thought to be a bot related issue, not sure what can be done to restrict the bot's actions, also may not want to "slow" the bot down within ZenCart as that may result in bad information being collected), but wanted to chime in, especially since it seems that a thread has been found that relates to this issue.
Is it really a situation that is to be reported in our logs? Is there some way to logic through it? If still in the investigation phase, I can understand that those questions may not be answerable yet. It does seem that it would have some sort of impact if it is an "error", but is it something that the bots care about? Is there something that should be modified on our server, or possibly should the company that "issued" the request(s) be notified? Is it just that these errors crop up because the server isn't fast enough to fully process the incoming traffic before performing the same action on the next/other requester? Sorry so full of questions, would like to help resolve this issue, as I have been deleting these duplicate records after identifying that I can not identify the root cause. :)
Hope all are well and keep up the great support. I haven't had to post anything really until now, because I have been able to find most of what I need via search of the forums, the internet, or specific code.