bitnami / vms

Bitnami VMs
https://bitnami.com
Other
203 stars 43 forks source link

[Magento 2.4.6-p1] Issues after migration #1359

Closed bbosWebServices closed 7 months ago

bbosWebServices commented 7 months ago

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

None given

bndiagnostic output

bndiagnostic tool makes the server fail.

Set up Magento 2.4.1-p1 on AWS lightsail VPS as development server - migrated to live AWS lightsail VPS and I'm running into issues:

1) sudo bin/magento-cli tool is taking a very long time to do anything, like 10 to 15 minutes to run module:status. 2) all server settings and code are the same as development server but all payment methods return a 400 server error when validating 3rd party payment. No idea where to even start looking for this. 3)Many processes end in errors, including server crash when running bndiagnostic.

bndiagnostic was not useful. Could you please tell us why?

server hangs when trying to run bndiagnostic

Describe your issue as much as you can

got staging.bigboxoutletstore.com working and tested. Did a server snapshot on AWS. Launched the snapshot as a new server instance. Used sudo /opt/bitnami/bncert-tool to reconfigure server for bigboxoutletstore.com ran into some issues trying to run setup:upgrade but eventually got it to run through and put in production mode. Did a test sales order and could not complete payment. almost everything I try seems to max out database connections or hangs with a 400 error, or kills the bitnami stack.

bbosWebServices commented 7 months ago

i just tried to do a cache:flush and the server hung on that. I feel like there might be a rogue cron job running.

bbosWebServices commented 7 months ago

I found this error after migration: Order saving error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (bitnami_magento.sales_invoice, CONSTRAINT SALES_INVOICE_ORDER_ID_SALES_ORDER_ENTITY_ID

bbosWebServices commented 7 months ago

I believe that I have figured everything else out... I am just struggling with this MySQL error related to a foreign key constraint on a core magento table. here is the error in full:

[object] (Zend_Db_Statement_Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (bitnami_magento.sales_invoice, CONSTRAINT SALES_INVOICE_ORDER_ID_SALES_ORDER_ENTITY_ID FOREIGN KEY (order_id) REFERENCES sales_order (entity_id) ON DELETE CASCADE), query was: INSERT INTO sales_invoice (store_id, base_grand_total, shipping_tax_amount, tax_amount, base_tax_amount, store_to_order_rate, base_shipping_tax_amount, base_discount_amount, base_to_order_rate, grand_total, subtotal_incl_tax, base_subtotal_incl_tax, store_to_base_rate, total_qty, base_to_global_rate, subtotal, base_subtotal, discount_amount, billing_address_id, state, shipping_address_id, store_currency_code, order_currency_code, base_currency_code, global_currency_code, increment_id, discount_tax_compensation_amount, base_discount_tax_compensation_amount, shipping_discount_tax_compensation_amount, base_shipping_discount_tax_compensation_amnt, discount_description, auction_discount, base_auction_discount) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) at /bitnami/magento/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:109) [previous exception] [object] (PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (bitnami_magento.sales_invoice, CONSTRAINT SALES_INVOICE_ORDER_ID_SALES_ORDER_ENTITY_ID FOREIGN KEY (order_id) REFERENCES sales_order (entity_id) ON DELETE CASCADE) at /bitnami/magento/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:90)

gongomgra commented 7 months ago

Hi @bbosWebServices,

Thanks for using Bitnami. Lightsail instances are of type burstable, which performance decreases over time as you run out of CPU credits. Because of that, they are not usually mean for production purposes. We recommend you to move to an AWS EC2 instance instead. Also notice Magento is a very demanding application, you will need to use a big instance for it. We highly recommend you to check official docs to get more information on the required resources for your use case.

Regarding internal Magento errors with the database, please open a new question in the official Magento forums, as that question is related to the application itself, not with our installation.

Apart from the above, I visited your website (removing the staging. part from the one you shared, and it works fine for me. Did you manage to solve your issue?

bbosWebServices commented 7 months ago

the site was not live - it was pointing to Shopify, so you saw that. I have fixed most of the problems now. I will migrate to EC2. Thanks for your help.

bbosWebServices commented 7 months ago

Closing