• Resolved anjoid

    (@anjoid)


    I keep getting this error “Stage 2 unable to complete due to memory restrictions. Please increase the memory_limit setting for PHP and try again.” when scanning for images to optimize. My server has plenty of memory.

    This seems to be an issue with php 7.4 or higher.

    Are you aware of this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    That particular error only happens if your server has less than 2MB of memory remaining. Note, the total server memory is not relevant here, as PHP has it’s own memory limit, which could be WAY lower. See what happens if you increase the PHP memory_limit setting.

    Thread Starter anjoid

    (@anjoid)

    I have 2G as my memory limit. It works fine if I downgrade to php 7.2 with the same limits.

    Plugin Author nosilver4u

    (@nosilver4u)

    That’s very strange… Don’t suppose there are any errors in the logs?

    Thread Starter anjoid

    (@anjoid)

    Debug log in eww is blank, here’s the page https://prnt.sc/uv0px5

    Plugin Author nosilver4u

    (@nosilver4u)

    I think your PHP 7.4 config is broken. In other words, even though you might have set it to 2GB somewhere, that is NOT taking effect in PHP 7.4. EWWW IO can run with very minimal memory if it has to, but when you have less than 2MB available, something is not working the way you think it is.

    Go to Tools->Site Health->Info->Server and it will tell you the effective memory limit.

    Thread Starter anjoid

    (@anjoid)

    Thanks for the quick reply!

    Here’s what I see there: https://prnt.sc/uv16xf

    Plugin Author nosilver4u

    (@nosilver4u)

    Ah, try changing your config to ‘2G’ instead of ‘2g’ and see what happens. Looks like our check is case-sensitive (something I’ll remedy in a future release).

    Thread Starter anjoid

    (@anjoid)

    That did it! Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Stage 2 unable to complete due to memory restrictions. Please increase the memor’ is closed to new replies.