1 year ago

#285549

test-img

Lukas Niestrat

shopware 6 cart api out of memory

I have built an app that configures product bundles, the last action is to add the products to the cart. I make an API call to /store-api/context and then set the token as sw-context-key to make another call to /store-api/checkout/cart/line-item with the body:

{
"items": [
    {
        "id":"5a48801fa3164919b44bfc95bc5cf6831",
        "referenceId":"5a48801fa3164919b44bfc95bc5cf6831",
        "quantity":2,
        "type":"product"
    },
    {
        "id":"ed6149fc89834a7ebadde07c18509a4a1",
        "referenceId":"ed6149fc89834a7ebadde07c18509a4a1",
        "quantity":1,
        "type":"product"
    }
]

}

Unfortunately the response from the server is always an internsal server error with "Error: Allowed memory size of 4294967296 bytes exhausted". What surprises me is that the memory_limit is set to 4096M according to phpinfo();.

The database product table includes 219000 entries. Even if I set the memory_limit to 32768M it does not work, that is very strange. Maybe someone has found a solution for this of can give me a hint how I have to configure php right, so the api can work correctly.

shopware

shopware6

0 Answers

Your Answer

Accepted video resources