Hard setting PHP memory limit to 128MB
-
Looks like pretty-link.php is hard setting PHP memory_limit to 128MB which is effecting most of the install, example:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/nginx/domains/domain.com/public/wp-includes/class-wpdb.php on line 2153even though:
# php -i |grep memory_limit memory_limit => 2G => 2Geven with wp config constant set.
Quick example with WP CLI:
# wp option get siteurl PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10485760 bytes) in /home/nginx/domains/domain.com/public/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-backup.php on line 173and now the same command yet skipping pretty-link
# wp option get siteurl --skip-plugins=pretty-link https://www.kitchenstewardship.comIf I comment out the lines
// Let's give pretty link plenty of room to work with $mem = abs(intval(@ini_get('memory_limit'))); if($mem && $mem > 1 && $mem < 128) { //$mem = 1 is probably abs(-1), -1 means "unlimited" @ini_set('memory_limit', '128M'); }Then everything is peachy
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Hard setting PHP memory limit to 128MB’ is closed to new replies.