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

Updating taxonomy with many posts results in timeout #430

Open
SuzukiEdo opened this issue Oct 7, 2024 · 2 comments
Open

Updating taxonomy with many posts results in timeout #430

SuzukiEdo opened this issue Oct 7, 2024 · 2 comments

Comments

@SuzukiEdo
Copy link

Description:

When a taxonomy with 100 more posts is updated, it can timeout the PHP's max execution time.

To Reproduce:
Steps to reproduce the behavior:

  1. Create a text category
  2. Add posts to it using something like wp dummy content. 100+ preferably.
  3. Update something in the category. Better if it's a term meta value.
  4. See error

Expected behavior
When a term is updated, all posts with that term are as well. For us is around 130, but on bigger sites that handle dozens of thousands of posts in different categories, this can/will time out. The plugin can handle this in a more gracefully way.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
  • Version: 129

Additional context
Our production servers are set to timeout at 30s. Increasing it might fix the problem in the short term, but is not a real solution to the issue.

@tw2113
Copy link
Member

tw2113 commented Oct 7, 2024

I feel like someone else opened a similar issue recently, but I cannot find where.

The change in question came with version 2.6.0

Added: Support for updating posts when an associated term has been updated.

https://github.com/WebDevStudios/wp-search-with-algolia/blame/main/includes/watchers/class-algolia-term-changes-watcher.php#L73-L105

Closest idea I can think of to help, without reverting the entire feature, would be a filter that can be used to return early, or perhaps have the arguments for the code spot filterable so that it's not fetching all the posts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@tw2113 @SuzukiEdo and others