Search code examples
ruby-on-railsherokuwebsolrhttp-status-code-429

RSolr::Error::Http (RSolr::Error::Http - 429


I am working on Ruby on Rails project hosted on heroku server. the search functionnalit works fine on localhost. But when i try on production i get the following error:

RSolr::Error::Http (RSolr::Error::Http - 429 
Error: {"code":429,"message":"Request meter exhausted. Please consider batching your requests, or contact [email protected] for help."}

I have spent time looking for resolving this problem. I found that the 429 code status refers to too many requests in websolr and it is used to protect from DoS attacks.

Please how can I resolve this issue.

Regards


Solution

  • Websolr Support here. An HTTP 429 response indicates that the connection pool to your index is fully saturated. There are a couple of options to address it:

    1. Batch updates. If you're making a lot of single-document writes for some reason, try batching them to reduce the number of connections in use.
    2. Upgrade to a higher plan. Concurrency limits scale with plan level, so upgrading can get you the resources you need.
    3. Shoot us an email at [email protected] and we'll take a look and see if there are any other recommendations.