Skip to content

Misreported memory by ini_get leads to failure of search function #293

@pingram3541

Description

@pingram3541

Issue: If hosting service is misconfigured and reports incorrect avail/total memory amount, search functions fail to execute and present results.

My host refuses to address this since the site essentially works.

Example searching for the string "export" inside my theme:

"Warning: The memory limit is about to be exceeded before the search has started, this could be an early indicator that your site may soon struggle as well, unfortunately this means the plugin is unable to perform any searches. Current memory consumption: 2353152 of 1 bytes"

However, if I edit line 88 in /includes/class-search.php from:

$memory_limit = ini_get( 'memory_limit' );

to something fixed like:

$memory_limit = '2G';

No more error and I get search results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions