Table of Contents

Requirement

To better handle the errors thrown by solr server when the load is high.

Solution & Implementation

At present we run solr 1.4 server on tomcat 6. We use sunspot and sunspot_rails gems (v 1.2.1) as the ruby client for solr. They are dependent on rsolr gem(v 0.12.1)

As per the notes here - http://help.websolr.com/kb/common-problems/503-service-unavailable

The best fixes for this would be -

a) Server - Update to the latest version of solr server(4.6 as of now) solr 3+ has scalability improvements. (- Not implemented)

b) Client - Change the client to retry once when service unavailable exception is thrown by solr server. After one retry if still the same error is occurring then just raise the error. (- Implemented)

The following errors will be tried again once -

Limitations

Future Work

When we move to ruby 2 and rails 4 , we can also try to update solr server and sunspot gems to the latest supported versions.