Is it possible to somehow increase? In php.ini worth 512

Fatal error: Allowed memory size of 134217728 by exhausted (tried to allocate 72 bytes)

  • one
    do not pay attention. the main thing is to get an answer - dirkgntly

2 answers 2

So, you have a value of 512MB in php.ini, and the script considers that it has been allocated 128MB.
Perhaps you have something of this:

  1. You are watching / editing the wrong php.ini or some kind of error in the configuration. Output phpinfo () and check.
  2. The size of the allocated memory is reduced in the settings of the web server. In Apache, for example, this is done with this directive: php_admin_value memory_limit 128MB .
  3. Limit set at .htaccess: php_value memory_limit 128MB . Remember that .htaccess values ​​can be taken from parent directories.
  4. Somewhere in your script, ini_set("memory_limit","128M"); still called ini_set("memory_limit","128M"); .

    You can naturally increase it, change 512 to a higher value and restart the web server. And better try to deal with a section of code in which a memory leak occurs. Find the part of the script whose call causes an error and quote it in the question.

    • I know a part of this code, but without it, not how. There, in 30 seconds, 10 servers are polled. and judging by the error of 134217728 bytes, this is 128 megabytes which is allocated by the same memory_limit but it is not in the script. what else can limit these 128 I can not understand and came here to ask. my brain is boiling ... - wwwplaton
    • one
      then I advise you to dissolve the poll somehow. for example, to do it not at the same time, but in order of priority, until the result is obtained from the first survey, do not proceed to the survey of the second. There are always options. - Nikolaj Sarry
    • no, not that i asked. - wwwplaton