Why Does Magento Checkout Show a White Screen with Large Carts (and How to Fix It)?

May 7, 2026
Why Does Magento Checkout Show a White Screen with Large Carts (and How to Fix It)?

Magento 2 – white screen in checkout (white screen of death) with a large cart

Imagine a customer who adds dozens of products to the cart… goes to checkout… and instead of the checkout page, sees a white screen.
Sound familiar? In Magento 2.4.x, this is not an uncommon issue – and we have just dealt with it on a live project.

Symptoms

  • Checkout worked correctly with smaller carts.

  • With dozens of products – a white page.

  • No messages or errors in the logs.

  • Checkout would randomly work, and a moment later the same cart would throw a blank page.

Lead number 1 – Redis?

The first suspicion fell on Redis: session locks, concurrency, timeouts.

After disabling Redis, the sessions did in fact calm down a bit, but the problem did not disappear at all.

Lead number 2 – shipping.phtml

ddd

Debugging step by step, we got to the file:

vendor/magento/module-checkout/view/frontend/templates/cart/shipping.phtml

which loaded a huge JSON object:

window.checkoutConfig = {$serializedCheckoutConfig};

Source of the problem – quoteItemData

It turned out that the culprit was this line in DefaultConfigProvider:

$output['quoteItemData'] = $quoteItemData;

meaning all product data in the cart. And at this point Magento was loading, among other things, custom_attributes_serializable, which could weigh in at… hundreds of MB.

Solution

The simplest fix: cut out unnecessary data before it reaches checkoutConfig.

We did this with a plugin on QuoteItem::setProduct():

public function afterSetProduct( MagentoQuoteModelQuoteItem $subject, $result, $product) { // główny winowajca $subject->setData('custom_attributes_serializable', null); return $result;}

The result?

  • Checkout started working reliably, even with large carts.

  • The JSON payload dropped from several/several dozen MB to a few hundred KB.

Takeaways

  • In Magento 2, checkout can be very sensitive to what ends up in quoteItemData.

  • If you are having issues with white screens in the cart/checkout – check the size of custom_attributes_serializable.

  • Sometimes one small plugin is enough to save the stability of the entire store.

Have you had similar checkout adventures? What other strange cases have broken your Magento cart? Share them in the comments

Aktualizacja preferencji plików cookie