6.0.0-alpha14
6/24/25

[#6410] lots of 'duplicate entry' when Horde_Cache is enabled
Summary lots of 'duplicate entry' when Horde_Cache is enabled
Queue Horde Base
Queue Version 3.2-RC2
Type Bug
State Resolved
Priority 2. Medium
Owners Horde Developers (at) , bklang (at) horde (dot) org
Requester leolistas (at) solutti (dot) com (dot) br
Created 03/09/2008 (6316 days ago)
Due
Updated 03/13/2008 (6312 days ago)
Assigned 03/12/2008 (6313 days ago)
Resolved 03/12/2008 (6313 days ago)
Github Issue Link
Github Pull Request
Milestone 3.2
Patch No

History
03/13/2008 02:20:14 AM Chuck Hagenbuch Deleted Original Message
 
03/12/2008 10:48:24 PM leolistas (at) solutti (dot) com (dot) br Comment #10 Reply to this comment
OK guys, thanks. I'll investigate this CSS stuff in CVS code. If it's 
really happening, i'll issue a new ticket.



Thanks and good night.
03/12/2008 10:33:44 PM Michael Slusarz Comment #9
State ⇒ Resolved
Reply to this comment
This sort of looks like a browser caching issue.  Some browsers (for 
example, IE) are notoriously bad when it comes to updating cached 
content.  In any case, this is a different issue than what Ben 
resolved so a separate ticket should be opened if the behavior 
persists in the future.
03/12/2008 10:25:17 PM leolistas (at) solutti (dot) com (dot) br Comment #8 Reply to this comment
i would love to track this and help you solve the problem instead of 
simply reporting the bug .....



unfortunelly, my php skills are enough only to modify some templates 
.... nothing more than that.



i'll try to checkout CVS over my RC2 tree and do some more extra 
testings .... probably i'll comment something tomorrow
03/12/2008 10:22:37 PM Ben Klang Comment #7 Reply to this comment
Our Release Candidates are pulled from the FRAMEWORK_3 branch so if 
you check that branch out you'll be very close indeed to the RC2 you 
have.



The alternative would be to wait for the next RC to drop and then 
retest.  Ideally it would be great if you could investigate on your 
own and try to track down the problem within the PHP code.
03/12/2008 10:19:55 PM leolistas (at) solutti (dot) com (dot) br Comment #6 Reply to this comment
I'm running both horde and IMP RC2



Horde: 3.2-RC2

Imp: H3 (4.2-RC2)



well .... is it possible to run a CVS checkout over this RC2 tree ?? 
Should it keep working, or there were too many changes ?


03/12/2008 10:16:08 PM Ben Klang Comment #5 Reply to this comment
I have cachecss enabled in my test environment but I'm not able to 
reproduce your behavior.  Do you have any other information you can 
think of to help me see the same behavior?  Are you running RC2 or a 
CVS checkout?
03/12/2008 10:10:31 PM leolistas (at) solutti (dot) com (dot) br Comment #4 Reply to this comment
but i think it's a IMP problem now .... if i enable other cache 
functions, even in IMP, like:



cachejs

use_mboxcache

use_mlistcache



everything seems to work fine. The problem seems to be only cachecss, 
and may be something IMP-related, not horde cache structure anymore.




03/12/2008 09:59:55 PM leolistas (at) solutti (dot) com (dot) br Comment #3
New Attachment: horde cachecss.jpg
Reply to this comment
Well ... there's no 'duplicate entry' errors anymore. I activated 
cache in horde and imp config, seems it's OK.



altough, after enabling Cache again, seems i found another bug. When i 
enable cachecss in IMP configuration, everything got screwed .... if i 
disable it and simply hit Refresh, everything goes back to normal 
again. Please watch screenshot, it's the login page. I have modified 
the template to include a dropdown box, but that's the only 
modification i have done. I havent changed anything css related !




03/12/2008 09:35:00 PM Ben Klang Comment #2
State ⇒ Feedback
Reply to this comment
I have just committed a test fix for this issue, please see 
framework/Cache/Cache/sql.php from CVS HEAD version 1.15.



http://cvs.horde.org/diff.php/framework/Cache/Cache/sql.php?r1=1.14&r2=1.15&ty=u



Would you please test and see if you have any more of these errors?
03/12/2008 09:24:32 PM Ben Klang Assigned to Ben Klang
Taken from Michael Slusarz
 
03/10/2008 01:49:16 AM Chuck Hagenbuch State ⇒ Assigned
Milestone ⇒ 3.2
Priority ⇒ 2. Medium
Assigned to Horde DevelopersHorde Developers
Assigned to Michael Slusarz
 
03/09/2008 12:48:24 AM leolistas (at) solutti (dot) com (dot) br Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ lots of 'duplicate entry' when Horde_Cache is enabled
Queue ⇒ Horde Base
State ⇒ Unconfirmed
Reply to this comment
I have just downloaded Horde 3.2-RC2 and IMP 4.2-RC2 and get them 
working, everything seems fine.



Then i created horde_cache table and enabled Horde_Cache with 
SQL-based storage. Values are:

cache.default_lifetime: 86400

cache.driver: SQL-based storage

cache.params.driverconfig: Horde defaults

cache.params.table: horde_cache

cache.params.use_memorycache: none



after i enabled some cache using on IMP, just like:



Server Tab

server.cachejs: true

server.cachejsparams.timeout: 86400

server.cachejsparams.mtime: NOT checked

server.cachecss: true

server.cachecssparams.timeout: 86400

server.cachecssparams.mtime: NOT checked



Mailbox and Fetchmail Tab

use_mboxcache: Yes

mboxcache.use_compress: No

mboxcache.preview_size: 1000

mboxcache.lifetime: 259200

use_mlistcache: Yes

mlistcache.lifetime: 604800





After these changes, Horde/IMP appears to be working fine, there's no 
error on the browser, everything seems to be working just fine. But on 
logs, i got a REAL LOT of error messages on horde_cache tables.



I got a few SELECT errors, which seems to have an empty cache_id 
parameter, just like:





Mar  8 21:42:01 f8 horde[25265]: [imp] DB Error: mismatch: SELECT 
cache_id, cache_timestamp FROM horde_cache WHERE cache_id =   [DB 
Error: mismatch] [pid 25265 on line 243 of 
"/home/httpd/html/horde/lib/Horde/Cache/sql.php"]



Mar  8 21:42:01 f8 horde[25265]: [imp] DB Error: mismatch: SELECT 
cache_id, cache_timestamp FROM horde_cache WHERE cache_id =   [DB 
Error: mismatch] [pid 25265 on line 243 of 
"/home/httpd/html/horde/lib/Horde/Cache/sql.php"]





and after those SELECT errors, i usually got a REAL LOT of INSERT errors:



Mar  8 21:41:11 f8 horde[25269]: [imp] DB Error: constraint violation: 
INSERT INTO horde_cache (cache_id, cache_timestamp, cache_data) VALUES 
('e629f174ffe682593097290b886eaae2', 1205023271, 0) [nativecode=1062 
** Duplicate entry 'e629f174ffe682593097290b886eaae2' for key 1] [pid 
25269 on line 198 of "/home/httpd/html/horde/lib/Horde/Cache/sql.php"]



Mar  8 21:41:11 f8 horde[25269]: [imp] DB Error: constraint violation: 
INSERT INTO horde_cache (cache_id, cache_timestamp, cache_data) VALUES 
('9f1846117c7ec45bb5c0cd5f8f4e8f51', 1205023271, 0) [nativecode=1062 
** Duplicate entry '9f1846117c7ec45bb5c0cd5f8f4e8f51' for key 1] [pid 
25269 on line 198 of "/home/httpd/html/horde/lib/Horde/Cache/sql.php"]



Mar  8 21:41:11 f8 horde[25269]: [imp] DB Error: constraint violation: 
INSERT INTO horde_cache (cache_id, cache_timestamp, cache_data) VALUES 
('4f921cb30288fa042067d6498244c86c', 1205023271, 0) [nativecode=1062 
** Duplicate entry '4f921cb30288fa042067d6498244c86c' for key 1] [pid 
25269 on line 198 of "/home/httpd/html/horde/lib/Horde/Cache/sql.php"]



Mar  8 21:41:11 f8 horde[25269]: [imp] DB Error: constraint violation: 
INSERT INTO horde_cache (cache_id, cache_timestamp, cache_data) VALUES 
('1b663801ffa1e296fcaf1be03d74957e', 1205023271, 0) [nativecode=1062 
** Duplicate entry '1b663801ffa1e296fcaf1be03d74957e' for key 1] [pid 
25269 on line 198 of "/home/httpd/html/horde/lib/Horde/Cache/sql.php"]





As I was using this horde/imp for testing somethings, i imagined, 
somehow, i could have screwed up some table data, so i logout, cleaned 
ALL tables, log the very first time with an user ... and there were 
the same errors described above. So, it wasn't being caused by some 
screwed data on some table.




Saved Queries