0

Can't add a new product and get an error.

SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine, query was: INSERT IGNORE INTO catalog_product_entity_varchar (entity_id,attribute_id,store_id,value) VALUES (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?)

Similar issue: https://github.com/magento/magento2/issues/21890

enter image description here

Please help us to solve this.

Thanks

2
  • Your fix seems to work for us with Magento 2.3.5p2 however it seems we are using a lot of attributes so our table 'catalog_product_entity_varchar' seems to be getting full. We are hitting a maximum. Is there a solution to increase the increment value to accept more id's? Cheers, Steve – Steve Feb 3 at 19:34
  • Change table ID field type int(11) to Bigint(11) – MHK Developer Feb 4 at 10:58
1

Run this query on your database

ALTER TABLE `catalog_product_entity_varchar` AUTO_INCREMENT = // last record's value_id+1 which is currently present in your table e.g if value_id is 5 than AUTO_INCREMENT = 6. If table is empty than put AUTO_INCREMENT = 1;

Don't forget to create a backup of your DB first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.