Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › PHP Memory Error
Tagged: PHP Memory Error
- This topic has 4 replies, 2 voices, and was last updated 3 years, 12 months ago by Trevor.
-
Chuck Taylor(Private) March 27, 2020 at 6:40 pm #238165
Hi,
We are uploading a number of posts on an automated, periodic process. We notify the search and filter plugin to update its cache for each post so they appear in our front end search. However, since adding the cache notification we have encountered this problem. Increasing the available memory did not seem to solve the issue, so presumably something is not releasing memory when it is done using it. Is there any common configuration mistake we may have made when adding the cache notification?
The automated process does work… for a while, which also leads to the diagnosis of unreleased memory.
Fri Mar 27 18:00:35.292658 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP Fatal error: Allowed memory size of 205520896 bytes exhausted (tried to allocate 1310720 bytes) in /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-content/plugins/search-filter-pro/includes/class-search-filter-post-cache.php on line 1771
[Fri Mar 27 18:00:35.292711 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP Stack trace:
[Fri Mar 27 18:00:35.292727 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP 1. {main}() /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-cron.php:0
[Fri Mar 27 18:00:35.292734 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP 2. do_action_ref_array() /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-cron.php:138
[Fri Mar 27 18:00:35.292740 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP 3. WP_Hook->do_action() /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-includes/plugin.php:544
[Fri Mar 27 18:00:35.292745 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP 4. WP_Hook->apply_filters() /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-includes/class-wp-hook.php:312
[Fri Mar 27 18:00:35.292750 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP 5. Fex_Fea_Directory_Upload_Admin->process_automated_upload() /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-includes/class-wp-hook.php:288
[Fri Mar 27 18:00:35.292756 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP 6. Fex_Fea_Directory_Upload_Admin->process_and_input_file_contents() /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-content/plugins/fex_fea_directory_upload/admin/class_fex_fea_directory_upload_admin.php:257
[Fri Mar 27 18:00:35.292760 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP 7. do_action() /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-content/plugins/fex_fea_directory_upload/admin/class_fex_fea_directory_upload_admin.php:491
[Fri Mar 27 18:00:35.292765 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP 8. WP_Hook->do_action() /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-includes/plugin.php:478
[Fri Mar 27 18:00:35.292769 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP 9. WP_Hook->apply_filters() /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-includes/class-wp-hook.php:312
[Fri Mar 27 18:00:35.292774 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP 10. Search_Filter_Post_Cache->update_cache_action() /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-includes/class-wp-hook.php:288
[Fri Mar 27 18:00:35.292780 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP 11. Search_Filter_Post_Cache->update_post_cache() /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-content/plugins/search-filter-pro/includes/class-search-filter-post-cache.php:119
[Fri Mar 27 18:00:35.292784 2020] [php7:notice] [pid 4746] [client 172.105.99.91:47632] PHP 12. Search_Filter_Post_Cache->get_all_cache_term_ids() /var/www/vhosts/family-enterprise-xchange.com/staging/public_html/wp-content/plugins/search-filter-pro/includes/class-search-filter-post-cache.php:1634Thanks,
ChuckChuck Taylor(Private) March 27, 2020 at 6:57 pm #238168Also, is there any guidance on what an ideal memory usage amount might be?
Trevor Moderator(Private) March 30, 2020 at 9:08 am #238226205520896 bytes is 205MB which is an unusual memory size to allocate. There are two variables that might affect the process.
The PHP variable
memory_limit
set on your server. Generally, I would normally recommend this be at least 256MB, but the more the better, up to maybe 1024MB.The WordPress WP_MEMORY_LIMIT (set in the
wp-config.php
file, if not set this will default to 40MB). Note, when setting this, it is set asM
notMB
. I normally recommend this to be no more than 50% of the PHP memory limit, and at least 128M. I personally prefer to set this at 256M (and thus the PHP memory limit at a least 512MB).If memory is not being released, that suggests that something odd is happening, as this is not normal.
Trevor Moderator(Private) April 29, 2020 at 10:51 am #241913This reply has been marked as private. -
AuthorPosts
You must be logged in to reply to this topic.