0

sorry for my language... I have a little problem with magento 2.3 . I use product catalog rules to create discounts for groups of users. once every day or two, there is no specific time or in any case I cannot understand why, the product rules no longer work. If I connect with a user who is associated with a group with rules, I do not see any product discounts. The only solution is to "reindex" and "flush" magento from terminal.

I created a cron job that reindexes and flushes cache every day, but that's not enough.

Every time I have to receive messages from my customers who do not see the discounts and at that moment I have to reindex.

Do you know which event triggers the loss of the rules ?? how can i solve?

Thanks for all.

0

The way you describe it is typical to your cron table being stuck.

It seems your database uses a prefix mg_

If you login to mysql and do the following select * from mg_cron_schedule where status not in ('success', 'pending');

If the result shows many results, then you will likely need to check the health of your cron processes.

6
  • I have updated my answer Apr 27 '21 at 8:42
  • Thanks for the reply. I ran the query and these results came out. the messages column says: id 792: " SQLSTATE[42S02]: Base table or view not found: 1146 Table 'aa_mg3.mg_magento_bulk' doesn't exist, query was: DELETE FROM mg_magento_bulk WHERE (start_time <= '2019-02-08 12:53:14') " id 831: " SQLSTATE[42S02]: Base table or view not found: 1146 Table 'aa_mg3.mg_inventory_stock' doesn't exist, query was: SELECT mg_inventory_stock.stock_id FROM mg_inventory_stock" What should I do? is this the cause of why i have to reindex and flush manually?
    – ITobeI
    Apr 27 '21 at 8:45
  • I think I understand the problem. Wrong the name of the tables or schema. How do I change the cron to point to different tables? If I fix these two problems does it fix the catalog rule problem?
    – ITobeI
    Apr 27 '21 at 8:48
  • I can't tell you that. If you have changed your system, it is not possibe to guess what you need, sorry Apr 27 '21 at 8:49
  • is there any way to edit the magento cron that produces this error?
    – ITobeI
    Apr 27 '21 at 8:56
0

enter image description here

Thanks for the reply. I ran the query and these results came out.

the messages column says:

id 792: " SQLSTATE[42S02]: Base table or view not found: 1146 Table 'aa_mg3.mg_magento_bulk' doesn't exist, query was: DELETE FROM mg_magento_bulk WHERE (start_time <= '2019-02-08 12:53:14') "

id 831: " SQLSTATE[42S02]: Base table or view not found: 1146 Table 'aa_mg3.mg_inventory_stock' doesn't exist, query was: SELECT mg_inventory_stock.stock_id FROM mg_inventory_stock"

What should I do? is this the cause of why i have to reindex and flush manually?

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.