• Hello,

    Our wordpress server shows a 502 error after we updated Red Hat and reinit server.

    (We tested the update before in a test enviroment without problems.)

    We are checking logs and see the following error:
    [error] [client #] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 3086783737 bytes) in /path/httpdocs/wp-includes/plugin.php on line 765

    init.php memory limit: 128 M
    wordpress memory (wp_config): WP_MEMORY_LIMIT 512

    Are these values the best optimized configuration?

    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    That’s a lot of memory but also try updating the php.ini memory_limit setting as well.

    Thread Starter xzoom

    (@xzoom)

    Thanks Jan,

    But I don’t understand it… which is the difference between php.ini memory and wp_memory_limit…

    The wp constant wp_memory_limit overwrites php.ini limit memory value?

    thanks!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    What PHP flavor are you running? I’m on RedHat and I only have the default allocated to WP, but I use mod_PHP (aka DSO) for my PHP.

    php.ini – How much memory PHP can use

    wp_memory_limit – How much memory WP can use

    WP’s should temporarily override the php.ini

    Thread Starter xzoom

    (@xzoom)

    Hello Ipstenu,

    I also use mod_PHP… and eaccelerator

    It is correct that php.ini is lower that wp_memory_limit? What are the correct values for multisite? How can I monotorize memory consumed by plugins?

    I have not had memory problems since linux update.

    Thanks a lot ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    It’s not INcorrect.

    What version of PHP?

    What did you update in Linux? It kinda sounds like that went wrong, but without more info we can only guess.

    Turn off your plugins and see if WP starts working again, if so, you’ll need to figure out what changed with PHP.

    Thread Starter xzoom

    (@xzoom)

    Now we have php 5.4.20 (before update was 5.3).
    Also patched updated kernel, httpd (5.2.2.3, mysql 5.5.3)

    (we have done rollback)

    But.. do you think 502 error is relationated with php script?

    How can I monotorize plugin usage memory?

    This is exagerated?
    PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 3086783737 bytes)

    thanks again ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I think it’s PHP related. A major upgrade of PHP can be tetchy since you don’t always pick the same options.

    Thread Starter xzoom

    (@xzoom)

    You are right… But what I don’t understand is why it is working correctly in a test environment (An exact copy of the server alive)

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    More traffic == more memory usage == BOOM.

    (NB: I’m reaaaally tired ?? )

    Thread Starter xzoom

    (@xzoom)

    Simple and very clear explanation ?? I will continue investigating.

    Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Error 502 (Bad Gateway)’ is closed to new replies.