Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pingram3541 opened this issue Jun 17, 2022 · 1 comment
Open
Labels

Comments

@pingram3541
Copy link

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.

@Clorith
Copy link
Contributor

Clorith commented Aug 14, 2022

Hiya,

Could you provide some more details on what the values are defined as on your environment? What is the value of ini_get( 'memory_limit' ) here? (Very interested since it appears to be interpreted as 1byte, which is not even enough to load up PHP)

@Clorith Clorith added the bug label Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants