[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 20:06:45 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:  needs-testing 2nd-opinion needs-     |     Focuses:
  patch                                          |  administration
-------------------------------------------------+-------------------------
Changes (by zodiac1978):

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


Comment:

 Replying to [comment:24 JavierCasares]:
 > > 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.

 Yes, but this is not the question here @JavierCasares

 If I can raise the limit to any value without knowing if this is actually
 available and WP raises the value to 256M no matter what in WP admin
 environment we do not provide any useful debugging information. The value
 will always be 256M.

 This means IMHO that the current patch is not useful and we should grab
 the `memory_limit` early and do not show the WP admin value, because it is
 not showing the actual available memory limit.

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


More information about the wp-trac mailing list