We are using Drupal 7.39, Search API Solr, MySQL as a database for our project.

Our site contains huge data where we have a daily aroung 2K active users on the site.
We are having Multisite, Multilingual features.

Currently we are getting a lot of PDOException errors on our site, and due to which its impacting site performance. Site is not loading and seeing high CPU usage.

When we searched in the log we found that "PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'public://583-MPI_DE_FINANCE_SURVEY_223x223px_2.jpg' for key 'uri': INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp) 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); Array"

Quick help would be highly appreciated.

Comments

ravimane23 created an issue. See original summary.

cilefen’s picture

Title: PDOException in Multiple tables in Drupal 7. » PDOException: SQLSTATE[23000]: Integrity constraint violation in file_managed
Component: database system » file system
Status: Active » Closed (duplicate)
Issue tags: -PDOException in Multiple tables in Drupal 7 with Seach API Solr.
Related issues: +#1163740: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 2: INSERT INTO {file_managed}

I removed unnecessary tags. I think this is the file system component. This is a duplicate of #1163740: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 2: INSERT INTO {file_managed}.