마 젠토 2 재색 인 프로세스 잠금 해제 방법


65

Magento reindex 프로세스에서 일부 테스트를 수행하고 있으며 주가 인덱스 프로세스를 잠갔습니다 .

이 프로세스를 어떻게 잠금 해제 할 수 있습니까?

Design Config Grid index has been rebuilt successfully in 00:00:02
Customer Grid index has been rebuilt successfully in 00:00:03
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:00
Product EAV index has been rebuilt successfully in 00:00:00
Stock index is locked by another reindex process. Skipping.
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Catalog Search index has been rebuilt successfully in 00:00:06

답변:


118

command with indexer:resetcommand line을 통해 인덱서를 재설정 할 수 있습니다 .

이것은 인덱스 이름 목록을 제공합니다 :

php bin/magento indexer:info

산출:

design_config_grid                       Design Config Grid
customer_grid                            Customer Grid
catalog_category_product                 Category Products
catalog_product_category                 Product Categories
catalog_product_price                    Product Price
catalog_product_attribute                Product EAV
catalogsearch_fulltext                   Catalog Search
cataloginventory_stock                   Stock
catalogrule_rule                         Catalog Rule Product
catalogrule_product                      Catalog Product Rule

인덱스 상태 목록을 제공합니다.

php bin/magento indexer:status

산출:

Design Config Grid:                                Ready
Customer Grid:                                     Ready
Category Products:                                 Ready
Product Categories:                                Ready
Product Price:                                     Ready
Product EAV:                                       Ready
Catalog Search:                                    Ready
Stock:                                             Processing
Catalog Rule Product:                              Ready
Catalog Product Rule:                              Ready

모든 색인을 재설정하려면 다음 명령을 실행할 수 있습니다.

php bin/magento indexer:reset

특정 색인 (예 :)을 재설정하려는 경우 cataloginventory_stock다음 명령을 실행할 수 있습니다.

php bin/magento indexer:reset cataloginventory_stock

1
인덱스를 재설정하면 인덱싱 대기중인 데이터가 손실됩니까?
— ol'bob dole

magento 2.2.4 enterprise edition위의 단계를 사용하여 해결했지만 동일한 문제가 발생 하지만 제품이 전면에 표시되지 않습니다. 어떤 아이디어가 문제입니까?
— Chirag Patel

좋아, 나에게 많은 도움이 ..
— 에이미

10

이런 종류의 상황에 직면했을 때 데이터베이스에 직접 다음 SQL 쿼리를 실행해야했습니다.

UPDATE indexer_state SET status = 'valid';

인덱스가 이전에 실패했을 때 다시 인덱싱을 강제하는 옵션을 찾을 수 없었습니다.


6

MySQL에서 다음을 실행하십시오.

SET SQL_SAFE_UPDATES = 0;
update indexer_state set status = 'invalid' where status != 'valid';

그런 다음 터미널에서 다음을 실행하십시오.

php bin/magento indexer:reindex

일반적으로 메모리 제한이 적을 때 발생하므로 .htaccess 또는 NGINX 구성을 늘리십시오 .


1

다음 명령을 사용하십시오.

php bin/magento indexer:reset
php bin/magento indexer:reindex
php bin/magento cache:clean full_page block_html

0

MySQL에서 일부 테이블이 잠겨있는 상태가 될 수도 있습니다. 이 경우 unlock tables;sql 문을 발행 하여 계속 진행할 수 있습니다.

나는 다음과 같은 문제에 부딪쳤다.

Category Products indexer process unknown error:
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction, query was: INSERT INTO

테이블 잠금이 제거 될 때까지 다시 인덱싱 할 수 없었습니다.

인덱스를 재설정하면 인덱싱 대기중인 데이터가 손실됩니까? – ol'bob dole

인덱싱은 데이터 세트를보고 적절한 데이터와 페어링하기 위해 일부 키를 저장하는 프로세스입니다. 프로세스에서 현재 색인을 잃어 버리고 다시 생성합니다. 자원을 사용하는 색인이나 데이터 세트가 부정확 한 색인의 부작용을 제외하고 재색 인화 할 위험이 없습니다.


0

이 명령을 실행하십시오

PHP bin / magento 인덱서 : reset PHP bin / magento 인덱서 : reindex


-2

다음 단계로이 문제를 해결했습니다.

1.- 테이블 삭제 customer_grid_flat

2.- 테이블을 다시 작성하십시오.

CREATE TABLE IF NOT EXISTS customer_grid_flat( entity_idint UNSIGNED NOT NULL COMMENT 'Entity ID', nametext NULL COMMENT 'Name', emailvarchar (255) NULL COMMENT 'Email', group_idint NULL COMMENT 'Group_id', created_attimestamp NULL 기본값 NULL COMMENT 'Created_at', website_idint NULL COMMENT 'Website_id', confirmationvarchar (255) NULL COMMENT 'Confirmation', created_intext NULL COMMENT 'Created_in', dobdate NULL COMMENT 'Dob', genderint NULL COMMENT 'Gender', taxvatvarchar (255) NULL COMMENT 'Taxvat', lock_expires타임 스탬프 NULL 기본값 NULL COMMENT 'Lock_expires', shipping_full텍스트 NULL COMMENT 'Shipping_full', billing_full텍스트 NULL COMMENT ' Billing_full ', billing_firstnamevarchar (255) NULL COMMENT'Billing_firstname ', billing_lastnamevarchar (255) NULL 주석 'Billing_lastname', billing_telephonevarchar (255) NULL 주석 'Billing_telephone', billing_postcodevarchar (255) NULL 주석 'Billing_postcode', billing_country_idvarchar (255) NULL COMMENT 'Billing_country_id', billing_regionvarchar (255) NULL 주석 'Billing_region', billing_streetvarchar (255) NULL 주석 'Billing_street', billing_cityvarchar (255) NULL 주석 'Billing_city', billing_faxvarchar (255) NULL COMMENT 'Billing_fax', billing_vat_idvarchar (255) NULL 주석 'Billing_vat_id', billing_companyvarchar (255) NULL 주석 'Billing_company', 기본 키 ( entity_id), 색인 CUSTOMER_GRID_FLAT_GROUP_ID( group_id), 색인 CUSTOMER_GRID_FLAT_CREATED_AT( created_at), 색인 CUSTOMER_GRID_FLAT_WEBSITE_ID( website_id), 색인 CUSTOMER_GRID_FLAT_CONFIRMATION( confirmation),색인 CUSTOMER_GRID_FLAT_DOB( dob), 색인CUSTOMER_GRID_FLAT_GENDER( gender) INDEX CUSTOMER_GRID_FLAT_BILLING_COUNTRY_ID( billing_country_id) FULLTEXT FTI_8746F705702DD5F6D45B8C7CE7FE9F2F( name, email, created_in, taxvat, shipping_full, billing_full, billing_firstname, billing_lastname, billing_telephone, billing_postcode, billing_region, billing_city, billing_fax, billing_companyENGINE = 이노 문자셋 = UTF8 부씩 = utf8_general_ci 'customer_grid_flat')) = COMMENT

당사 사이트를 사용함과 동시에 당사의 쿠키 정책과 개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.