Plugin crashes the site when quota exceeded

When quota is exceeded the plugin crashes the site, at least in the admin. This really should not happen but instead you should display an error message in the admin, and on the front end you need a more graceful way to deal with exceeding quota, such as sending an email to the admin giving them at least several days to correct (what if they are on vacation?)

Fatal error: Uncaught exception 'AlgoliaSearch\AlgoliaException' with message 'Operations quota 
exceeded, change plan to get more Operations.' in 
ugins/algolia/includes/libraries/algoliasearch-client-php/src/AlgoliaSearch/Client.php:992 Stack trace: #0 
AlgoliaSearch\Client->doRequest(Object(AlgoliaSearch\ClientContext), 'POST', 'KL59AT9W3U.algo...', 
'/1/indexes/wp_t...', Array, Array, 1, 30) #1 /srv/bindings/02f9a2938af2492c900b6418c1b2d728/code/wp-
AlgoliaSearch\Client->request(Object(AlgoliaSearch\ClientContext), 'POST', '/1/indexes/wp_t...', Array, 
Array, Array, 1, 30) #2 /srv/bindings/02f9a2938af2492c900b6418c1b2d728/code/wp-content/mu-
plugins/algolia/includes/libraries/algoliasearch-client in 
plugins/algolia/includes/libraries/algoliasearch-client-php/src/AlgoliaSearch/Client.php on line 992


Hi @mikeschinkel-dup,

This indeed shouldn’t happen, thanks for reporting it.
I thought we addressed this already in the past?

What version of the plugin are you using?

v2.5. I see you are on v2.6. Did that fix it?

I updated the site to 2.6, but have not had time to test.

I just checked the code, and apparently I didn’t fix it. Not sure why I thought I did.

Can you confirm this happens on a specific action in the admin? Like saving a post or something?

I will fix it ASAP once I get your answer. I consider this a top priority.


Yes, I experienced the error when attempting to publish a post (post_type='post'). I did not try anything else, such as searching from the front end, which might also be affected.

Ok, thanks for confirming I will fix it.

I have just released version 2.6.1 that will avoid raising such errors.

Thanks again for the initial report :heart:

Absolutely. Thanks again for a great service!

1 Like

This also was happening in Shopify!

I second this post!

@Jerska might be able to help on Shopify :rocket:

On Shopify, it is a bit less blocking on the admin side. I have to agree that it probably messes up the search page and that we’d like to provide a smoother alternative than simply disallowing the end-users to search.

We already send a fair amount of emails warning about approaching the quotas.
My recommendation in the meantime would simply to disable the autocomplete and instantsearch page (two checkboxes) if you see that you’re at ~90% of your operations and too much time before the end of the invoicing period.

To be honest though, with 100K operations, you should already have a business running pretty good and should be able to afford a paying plan. :slight_smile:

1 Like