# PaymentMethodBlockedError führt zu allowed memory exhausted v6.2.5.3 stable

**URL:** <https://forum.shopware.com/t/paymentmethodblockederror-fuehrt-zu-allowed-memory-exhausted-v6-2-5-3-stable/86674>\
**Category:** Shopware 6 (German)\
**Tags:** general, programming\
**Created:** [6. April 2021 um 13:54 UTC](https://forum.shopware.com/t/paymentmethodblockederror-fuehrt-zu-allowed-memory-exhausted-v6-2-5-3-stable/86674 "2021-04-06T13:54:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![develissimo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/develissimo/32/12974_2.png) [@develissimo](https://forum.shopware.com/u/develissimo)\
**Post date:** [6. April 2021 um 13:54 UTC](https://forum.shopware.com/t/paymentmethodblockederror-fuehrt-zu-allowed-memory-exhausted-v6-2-5-3-stable/86674/1 "2021-04-06T13:54:45Z")

</div>

Hallo Leute,

bei einem unsrer Kunden im Production Shop mit v6.3.5.2 stable (multiple Sales-Channels + Payment Plugin Mollie-Zahlungssystem) haben wir seit diesem Wochenende das Problem (Server stürzt ab, kein weiterer Speicher verfügbar…) , wenn die gewählte Standard Zahlungsart beim Kunden nicht für den aktuellen Sales-Channel verfügbar ist…

Der Server hört nicht auf Speicher zu allokieren bis „nichts mehr geht“ [bei 16GByte haben wir mit unsren Tests Schluss gemacht… sollte für einen Checkout hinreichend sein 😉]

Konkret in Pfad:  
`/var/www/example/httpdocs/vendor/shopware/core/Checkout/Payment/Cart/PaymentMethodValidator.php`

führen die:  
new PaymentMethodBlockedError(String) zu **Allowed memory size of 6291456000 bytes exhausted**

Error-Log:  
Tue Apr 06 10:03:53.381983 2021] [proxy\_fcgi:error] [pid 1509] [client 91.113.230.50:60576] AH01071: Got error ‚PHP message: PHP Fatal error: Allowed memory size of 6291456000 bytes exhausted (tried to allocate 266240 bytes) in /var/www/example/httpdocs/vendor/shopware/core/Checkout/Payment/Cart/PaymentMethodValidator.php on line 31PHP message: PHP Fatal error: Allowed memory size of 6291456000 bytes exhausted (tried to allocate 36864 bytes) in /var/www/example/httpdocs/vendor/symfony/cache/Traits/FilesystemTrait.php on line 70‘, referer: [https://example.com/](https://example.com/)  
Binary file (standard input) matches

Tatsächliche Kunden-Domain natürlich mit [example.com](http://example.com) ersetzt.

**Ursache:**  
Ursache ist new PaymentMethodBlockedError(String). Interessant ist das deshalb, da diese lediglich die abstrakte Klasse Error, welche wiederum Exception extended erweitert. Es wird also nur ein String als Message an eine Exception übergeben…

Warum hört hier das System nicht auf Speicher zu allokieren? Was ist bei Error=\>Exception Sache so mächtig?  
Habe bereits versucht einfache Strings zu übergeben… führt ebenfalls zum allowed memory size \*\*\* exhausted error.

**System:**  
Shopware v6.2.5.3 stable  
Mollie Zahlungs-Plugin

Lg  
Raphael

---

<div class="post-metadata">

**Author:** ![develissimo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/develissimo/32/12974_2.png) [@develissimo](https://forum.shopware.com/u/develissimo)\
**Post date:** [7. April 2021 um 06:07 UTC](https://forum.shopware.com/t/paymentmethodblockederror-fuehrt-zu-allowed-memory-exhausted-v6-2-5-3-stable/86674/2 "2021-04-07T06:07:24Z")

</div>

Additional info: PaymentMethodValidator-\>validate() function is called too often!  
Too often === 308 times!!!

There are only 4 payment methods and there is only one product in the cart.

So this repetitive call of function PaymentMethodValidator=\>validate() is responsible for this server overload.

Will report a BUG to Bug-Tracker.

---

<div class="post-metadata">

**Author:** ![develissimo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/develissimo/32/12974_2.png) [@develissimo](https://forum.shopware.com/u/develissimo)\
**Post date:** [7. April 2021 um 07:03 UTC](https://forum.shopware.com/t/paymentmethodblockederror-fuehrt-zu-allowed-memory-exhausted-v6-2-5-3-stable/86674/3 "2021-04-07T07:03:02Z")

</div>

Find the Issue on BUG-Tracker: [Shopware Issuetracker](https://issues.shopware.com/issues/NEXT-14644)

Hopefully shopware fixes this soon!
