WordPress.org

Ready to get started?Download WordPress

Forums

Which are the right settings for php memory? (16 posts)

  1. B_Dark
    Member
    Posted 1 year ago #

    Am a little bit confused. I have a reseller account with 1 gb of physical memory. My host has made these settings in wodpress multisite

    on my .htaccess they have added

    php_value memory_limit 1024M
    php_value max_execution_time 3600M
    php_value post_max_size 60M
    php_value upload_max_filesize 100M

    on my wp-config.php

    define('WP_MEMORY_LIMIT', '1024M');

    on my php.ini (inside of public_html)

    max_execution_time = 3600
    max_input_time = 60
    memory_limit = 1024M

    and on my php.ini (in root of)

    max_execution_time = 600
    max_input_time = 60
    memory_limit = 1024M

    on phpinfo.php show me this right now

    memory_limit 64M(local) 1024M(master)

    on nextgen server infos show me this

    Operating System : Linux (64 Bit)
    Server : LiteSpeed
    Memory usage : 13.16 MByte
    MYSQL Version : 5.1.65-cll
    SQL Mode : Not set
    PHP Version : 5.3.18
    PHP Safe Mode : Off
    PHP Allow URL fopen : On
    PHP Memory Limit : 1024
    PHP Max Upload Size : 100M
    PHP Max Post Size : 60M
    PCRE Backtracking Limit : 500000
    PHP Max Script Execute Time : 3600Ms

    on server info's of Simple Ads Manager shows me this

    WordPress Version: 3.4.2
    SAM Version: 1.7.57
    SAM DB Version: 2.1
    PHP Version: 5.3.18
    MySQL Version: 5.1.65-cll
    Memory Limit: 256M

    The settings that my host made should be changed?
    Why on the plugins shows different results for my php memory limit?

  2. Jesús Franco
    Member
    Posted 1 year ago #

    1G seems like a lot for WP. Try with 128M I run two networks and nobody has complained about memory limit errors so far :-)

    Oh! and max_execution_time is about seconds; 3600, again it's too much, danger of DoS on scripts going bad at runtime.

  3. B_Dark
    Member
    Posted 1 year ago #

    ok, i change everywhere to 128m and max_execution_time to 600, but I see no difference in my Fatal error: Out of memory :/

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    What exactly is the error message that you are seeing?

  5. B_Dark
    Member
    Posted 1 year ago #

    Fatal error: Out of memory (allocated 191102976) (tried to allocate 72 bytes) in/home/site/public_html/wp-includes/meta.php on line 571

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    You only have a little over 182M available to PHP! You need to go back to your hosts with that error message - especially since they've been trying to raise your memory allocation by more than 5x that amount. I can only guess that there's an issue at the server level that they've overlooked.

  7. B_Dark
    Member
    Posted 1 year ago #

    I checked my site at http://browsershots.org and the half had errors.

    Here are some erros from my error log

    [09-Jan-2013 18:49:49 UTC] PHP Fatal error: Out of memory (allocated 16515072) (tried to allocate 84 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 219
    [09-Jan-2013 18:49:49 UTC] PHP Fatal error: Out of memory (allocated 16515072) (tried to allocate 51 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 66
    [09-Jan-2013 18:49:50 UTC] PHP Fatal error: Out of memory (allocated 15466496) (tried to allocate 72 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 227
    [09-Jan-2013 18:49:50 UTC] PHP Fatal error: Out of memory (allocated 14942208) (tried to allocate 77 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 219
    [09-Jan-2013 18:49:50 UTC] PHP Fatal error: Out of memory (allocated 12582912) (tried to allocate 18 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 234
    [09-Jan-2013 18:49:50 UTC] PHP Fatal error: Out of memory (allocated 14680064) (tried to allocate 90 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 219
    [09-Jan-2013 18:49:50 UTC] PHP Fatal error: Out of memory (allocated 12320768) (tried to allocate 107 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 227
    [09-Jan-2013 18:49:50 UTC] PHP Fatal error: Out of memory (allocated 12320768) (tried to allocate 107 bytes) in /home/mysite/public_html/wp-includes/pomo/entry.php on line 66
    [09-Jan-2013 18:49:51 UTC] PHP Fatal error: Out of memory (allocated 10223616) (tried to allocate 85 bytes) in /home/mysite/public_html/wp-includes/functions.php on line 730
    [09-Jan-2013 18:49:51 UTC] PHP Fatal error: Out of memory (allocated 11010048) (tried to allocate 71 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 86
    [09-Jan-2013 18:49:51 UTC] PHP Fatal error: Out of memory (allocated 9437184) (tried to allocate 38328 bytes) in /home/mysite/public_html/wp-includes/functions.php on line 251
    [09-Jan-2013 18:49:51 UTC] PHP Fatal error: Out of memory (allocated 11010048) (tried to allocate 32 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 86
    [09-Jan-2013 18:49:51 UTC] PHP Fatal error: Out of memory (allocated 10223616) (tried to allocate 85 bytes) in /home/mysite/public_html/wp-includes/functions.php on line 730
    [09-Jan-2013 18:49:51 UTC] PHP Fatal error: Out of memory (allocated 18612224) (tried to allocate 64 bytes) in /home/mysite/public_html/wp-includes/widgets.php on line 631
    [09-Jan-2013 18:49:52 UTC] PHP Fatal error: Out of memory (allocated 14942208) (tried to allocate 82 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 219
    [09-Jan-2013 18:49:52 UTC] PHP Fatal error: Out of memory (allocated 13369344) (tried to allocate 78 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 219
    [09-Jan-2013 18:49:52 UTC] PHP Fatal error: Out of memory (allocated 10485760) (tried to allocate 32 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 86
    [09-Jan-2013 18:49:52 UTC] PHP Fatal error: Out of memory (allocated 13631488) (tried to allocate 84 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 219
    [09-Jan-2013 18:49:52 UTC] PHP Fatal error: Out of memory (allocated 14942208) (tried to allocate 64 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 227
    [09-Jan-2013 18:49:52 UTC] PHP Fatal error: Out of memory (allocated 15728640) (tried to allocate 32 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 227
    [09-Jan-2013 18:49:52 UTC] PHP Fatal error: Out of memory (allocated 15204352) (tried to allocate 82 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 219
    [09-Jan-2013 19:03:49 UTC] PHP Fatal error: Out of memory (allocated 23330816) (tried to allocate 71 bytes) in /home/mysite/public_html/wp-includes/taxonomy.php on line 2678
    [09-Jan-2013 19:03:49 UTC] PHP Fatal error: Out of memory (allocated 10223616) (tried to allocate 491520 bytes) in /home/mysite/public_html/wp-content/plugins/simple-ads-manager/ad.class.php on line 441
    [09-Jan-2013 19:03:49 UTC] PHP Fatal error: Out of memory (allocated 23330816) (tried to allocate 71 bytes) in /home/mysite/public_html/wp-includes/taxonomy.php on line 2678
    [09-Jan-2013 19:03:49 UTC] PHP Fatal error: Out of memory (allocated 1572864) (tried to allocate 7680 bytes) in /home/mysite/public_html/wp-includes/functions.php on line 2869
    [09-Jan-2013 19:03:55 UTC] PHP Fatal error: Out of memory (allocated 16515072) (tried to allocate 21 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 221
    [09-Jan-2013 19:04:11 UTC] PHP Fatal error: Out of memory (allocated 16515072) (tried to allocate 78 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 219

    I've sent these data with a ticket to my host
    and he told me that he doesn't see any error, not in the root site and not in any other page. And he asked me to give him the exact URL which is showing the memory error.

    And I am asking you what can I send when this is tottaly random, I can't determine when is showing it or it shows white pages randomly. I feel that they are fooling me now, am I wrong?

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    Looking at that error log, the PHP memory allocation is all over the place! In some places, it's as low as 9M!

    [09-Jan-2013 18:49:51 UTC] PHP Fatal error: Out of memory (allocated 9437184) (tried to allocate 38328 bytes) in /home/mysite/public_html/wp-includes/functions.php on line 251

    Try asking your host how he accounts for the wild memory fluctuations.

  9. B_Dark
    Member
    Posted 1 year ago #

    answer of my host..

    I could see that your account php memory limit was set to 128MB which resulted this. I have increased it so 512MB. Are you getting memory errors on any script installations at the moment?

  10. esmi
    Forum Moderator
    Posted 1 year ago #

    When was this answer from?

  11. B_Dark
    Member
    Posted 1 year ago #

    Me 01/09/2013 15:58

    Looking at that error log, the PHP memory allocation is all over the place! In some places, it's as low as 9M! [09-Jan-2013 18:49:51 UTC] PHP Fatal error: Out of memory (allocated 9437184) (tried to allocate 38328 bytes) in /home/mysite/public_html/wp-includes/functions.php on line 251)

    how you accounts for the wild memory fluctuations?

    hat can I send when this is totally random, I can't determine when is showing it or it shows white pages randomly.

    Host 01/09/2013 16:32

    I could not see any more php memory errors under your account,

    ==========
    tail -f error_log
    [09-Jan-2013 19:03:49 UTC] PHP Fatal error: Out of memory (allocated 23330816) (tried to allocate 71 bytes) in /home/mysite/public_html/wp-includes/taxonomy.php on line 2678
    [09-Jan-2013 19:03:49 UTC] PHP Fatal error: Out of memory (allocated 1572864) (tried to allocate 7680 bytes) in /home/mysite/public_html/wp-includes/functions.php on line 2869
    [09-Jan-2013 19:03:55 UTC] PHP Fatal error: Out of memory (allocated 16515072) (tried to allocate 21 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 221
    [09-Jan-2013 19:04:11 UTC] PHP Fatal error: Out of memory (allocated 16515072) (tried to allocate 78 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 219

    # date
    Wed Jan 9 22:30:11 GMT 2013
    ==========

    Please check and verify from your end.

    Me 01/09/2013 16:38

    show what? it doesn't mean anything? you don't answered to my question...how you accounts for the wild memory fluctuations?

    Host 01/09/2013 16:46

    I could see that your account php memory limit was set to 128MB which resulted this. I have increased it so 512MB. Are you getting memory errors on any script installations at the moment?

    Me 01/09/2013 16:52

    on php.ini (public_html) is

    ;;;;;;;;;;;;;;;;;;;
    ; Resource Limits ;
    ;;;;;;;;;;;;;;;;;;;

    max_execution_time = 600
    max_input_time = 60
    memory_limit = 128M

    and on wp-config.php is

    define('WP_MEMORY_LIMIT', '128M');

    so we have to change and those right?

    Host 01/09/2013 17:11

    Hello,
    Yes, you can change php parameters through custom htaccess or wordpress configuration.

  12. esmi
    Forum Moderator
    Posted 1 year ago #

    Uh? :-0

    Your hosts said:

    I could not see any more php memory errors under your account

    And your error logs include:

    [09-Jan-2013 19:03:49 UTC] PHP Fatal error: Out of memory (allocated 23330816) (tried to allocate 71 bytes) in /home/mysite/public_html/wp-includes/taxonomy.php on line 2678

    Which part of "PHP Fatal error: Out of memory" is your host having problems understanding?

    Unless you can escalate this to a better level of support with your current hosts, I think you need to look at moving to another host. I am at a complete loss to explain their responses.

  13. B_Dark
    Member
    Posted 1 year ago #

    newanswer fom host
    01/09/2013 18:12

    Hi,

    Error logs showing your account still showing memory errors. While checking further, I could see that mysite exceeded allotted resource multiple times, which caused this issue.

    =================
    mysite site.com 0.41 0.10 0.1
    mysite site.com 93.0 lsphp5:/home/mysite/public_html/index.php
    mysite site.com 72.0 lsphp5:/home/mysite/public_html/index.php
    =================

    You can verify this through cPanel >> Logs >> Resource usage.

  14. B_Dark
    Member
    Posted 1 year ago #

    my new error log

    [09-Jan-2013 23:50:17 UTC] PHP Fatal error: Out of memory (allocated 10223616) (tried to allocate 71 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 86
    [09-Jan-2013 23:50:17 UTC] PHP Fatal error: Out of memory (allocated 12845056) (tried to allocate 64 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 227
    [09-Jan-2013 23:50:17 UTC] PHP Fatal error: Out of memory (allocated 12058624) (tried to allocate 82 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 219
    [09-Jan-2013 23:50:17 UTC] PHP Fatal error: Out of memory (allocated 11796480) (tried to allocate 123 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 221
    [09-Jan-2013 23:50:17 UTC] PHP Fatal error: Out of memory (allocated 14680064) (tried to allocate 71 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 227
    [09-Jan-2013 23:50:17 UTC] PHP Fatal error: Out of memory (allocated 16252928) (tried to allocate 64 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 227
    [09-Jan-2013 23:50:18 UTC] PHP Fatal error: Out of memory (allocated 14417920) (tried to allocate 78 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 219
    [09-Jan-2013 23:50:18 UTC] PHP Fatal error: Out of memory (allocated 12845056) (tried to allocate 64 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 227
    [09-Jan-2013 23:50:18 UTC] PHP Fatal error: Out of memory (allocated 9699328) (tried to allocate 32 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 86
    [09-Jan-2013 23:50:18 UTC] PHP Fatal error: Out of memory (allocated 14942208) (tried to allocate 64 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 227
    [09-Jan-2013 23:50:18 UTC] PHP Fatal error: Out of memory (allocated 13107200) (tried to allocate 131072 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 219
    [09-Jan-2013 23:50:18 UTC] PHP Fatal error: Out of memory (allocated 12582912) (tried to allocate 189 bytes) in /home/mysite/public_html/wp-includes/pomo/mo.php on line 234
    [09-Jan-2013 23:50:19 UTC] PHP Fatal error: Out of memory (allocated 23330816) (tried to allocate 68533 bytes) in /home/mysite/public_html/wp-includes/formatting.php on line 3133
    [09-Jan-2013 23:50:19 UTC] PHP Fatal error: Out of memory (allocated 11272192) (tried to allocate 262145 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 139
    [09-Jan-2013 23:50:19 UTC] PHP Fatal error: Out of memory (allocated 11272192) (tried to allocate 262145 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 139
    [09-Jan-2013 23:50:19 UTC] PHP Fatal error: Out of memory (allocated 11010048) (tried to allocate 217089 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 139
    [09-Jan-2013 23:50:19 UTC] PHP Fatal error: Out of memory (allocated 17825792) (tried to allocate 79 bytes) in /home/mysite/public_html/wp-includes/pomo/entry.php on line 49
    [09-Jan-2013 23:50:19 UTC] PHP Fatal error: Out of memory (allocated 9437184) (tried to allocate 232 bytes) in /home/mysite/public_html/wp-includes/default-widgets.php on line 349
    [09-Jan-2013 23:50:24 UTC] PHP Fatal error: Out of memory (allocated 11010048) (tried to allocate 217089 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 139
    [09-Jan-2013 23:50:24 UTC] PHP Fatal error: Out of memory (allocated 9437184) (tried to allocate 81 bytes) in /home/mysite/public_html/wp-includes/default-widgets.php on line 349
    [09-Jan-2013 23:50:24 UTC] PHP Fatal error: Out of memory (allocated 11010048) (tried to allocate 217089 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 139
    [09-Jan-2013 23:50:24 UTC] PHP Fatal error: Out of memory (allocated 11010048) (tried to allocate 217089 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 139
    [09-Jan-2013 23:50:26 UTC] PHP Fatal error: Out of memory (allocated 10747904) (tried to allocate 71 bytes) in /home/mysite/public_html/wp-includes/pomo/streams.php on line 86
    [10-Jan-2013 00:31:03 UTC] PHP Warning: printf() [function.printf]: Too few arguments in /home/mysite/public_html/wp-content/themes/site/functions.php on line 443

  15. esmi
    Forum Moderator
    Posted 1 year ago #

    Have you tried deactivating some plugins?

  16. B_Dark
    Member
    Posted 1 year ago #

    oh yes i have deactivated a lot of them !

Topic Closed

This topic has been closed to new replies.

About this Topic