[wp-trac] [WordPress Trac] #49329: memory_limit in site health is not really correct, value is taken from wp_raise_memory_limit

WordPress Trac noreply at wordpress.org
Mon May 18 17:32:25 UTC 2020


#49329: memory_limit in site health is not really correct, value is taken from
wp_raise_memory_limit
-------------------------------------------------+-------------------------
 Reporter:  espiat                               |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  5.5
Component:  Site Health                          |     Version:  5.3.2
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing 2nd-opinion  |     Focuses:
                                                 |  administration
-------------------------------------------------+-------------------------
Changes (by JavierCasares):

 * keywords:  needs-patch => has-patch needs-testing 2nd-opinion


Comment:

 Checking the @zodiac1978 comments...

 The machine has 128M real memory limit, but PHP doesn't check the hardware
 configuration, it uses its own configuration... so, if a machine has 128MB
 RAM, you can configure 512MB for PHP. So, its possible that the machine
 crash, but the configuration is correct, because PHP has a 512MB
 configuration (not recommended, of course).

 > I can use ini_set( 'memory_limit', '256M' ); and then ini_get(
 'memory_limit' ); shows 256M (instead of the correct 128M).

 This is how PHP works... so, you can update the PHP config via ini_set(),
 and when you do ini_get() you will retrieve the new info, although the
 hardware has whatever...

 I don't think this is an issue, is how PHP works.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49329#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list