I get this after I enable advagg:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'IytIHwH1SUr0-GTrR2c0ukYSgP4O_yJXw_pdpzeiz14' for key 'PRIMARY': INSERT INTO {advagg_files} (filename, filename_hash, content_hash, filetype, filesize, linecount, mtime, changes) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => profiles/openatrium/themes/oa_radix/assets/stylesheets/screen.css [:db_insert_placeholder_1] => IytIHwH1SUr0-GTrR2c0ukYSgP4O_yJXw_pdpzeiz14 [:db_insert_placeholder_2] => jZFvpLI007Nh5L_42NYwnlX4sEeiuURA8LZi0mXM-7Q [:db_insert_placeholder_3] => css [:db_insert_placeholder_4] => 230767 [:db_insert_placeholder_5] => 3969 [:db_insert_placeholder_6] => 1396677122 [:db_insert_placeholder_7] => 1 ) in drupal_write_record() (line 7219 of /var/aegir/platforms/7/servers/sng-contrib/sng-d7.26-oa-2.15/includes/common.inc).
Comment | File | Size | Author |
---|---|---|---|
#8 | advagg-2233937-8-wrap-db_merge-insert-in-try-catch.patch | 1.06 KB | mikeytown2 |
#2 | advagg-2233937-2-fix-pdo-error.patch | 1.5 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedadvagg_insert_update_files() get's called from 2 places; advagg_push_new_changes() in advagg.cache.inc and advagg_insert_update_db() in advagg.inc. The one in advagg_insert_update_db has a lock so that means that the call to it in advagg_push_new_changes() needs more logic or I might need to catch exceptions around the call to drupal_write_record().
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedThis patch has been committed.
Comment #5
Marko B CreditAttribution: Marko B commentedI see this patch is old and you moved that code to advagg,module. What happend is that I had the same problem with 7.x-2.7 version.
Whole lot of errors in watchdog, on many pages this duplicate entry calls.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'LOw93khOQLWwalcvT84vupySWe8w7FwZ28zogOWSMTU' for key 'PRIMARY': INSERT INTO {advagg_files} (filename, filename_hash, content_hash, filetype, filesize, mtime, linecount, changes) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => public://ctools/css/e62586b27c14b25d76df3b2257527061_3.css [:db_insert_placeholder_1] => LOw93khOQLWwalcvT84vupySWe8w7FwZ28zogOWSMTU [:db_insert_placeholder_2] => nRDvqzolSD2ttCa9wWpoo20tPZMBbvtPKQYJubU0srM [:db_insert_placeholder_3] => css [:db_insert_placeholder_4] => 3604 [:db_insert_placeholder_5] => 1429707480 [:db_insert_placeholder_6] => 42 [:db_insert_placeholder_7] => 1 ) in advagg_insert_update_files() (line 200 of /var/www/html/sites/all/modules/contrib/advagg/advagg.inc
Comment #6
Marko B CreditAttribution: Marko B commentedOn dev version it is the same thing, a lot of this errors happening. I will remove module for now as it seems problematic if this things happens over and over.
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedI'll look into this more next week.
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedWrapped this in a try catch block.