I just discovered that the search functionality on my web site doesn’t work. Going through some logs, I find this:
unicorn.stdout.log: (…) Error connecting to Sphinx via the MySQL protocol. Error connecting to Sphinx via the MySQL protocol. Can’t connect to MySQL server on ‘127.0.0.1’ (…)
production.searchd.log: (…) [Sat Mar 24 01:56:16.713 2018]  rotating indices (seamless=1) [Sat Mar 24 01:56:16.730 2018]  rotating index ‘listing_delta’: started [Sat Mar 24 01:56:16.738 2018]  rotating index ‘listing_delta’: success [Sat Mar 24 01:56:16.738 2018]  rotating index: all indexes done [Tue Mar 27 10:28:26.365 2018]  caught SIGTERM, shutting down [Tue Mar 27 10:28:26.926 2018]  shutdown complete <and then nothing after March 27th>
I’m trying rake ts:restart, reindex, stop, start etc, but then I get error messages like this: rake aborted! ActiveRecord::AdapterNotSpecified: ‘development’ database is not configured. Available: [“production”] /path/to/file/environment.rb:17:in `<top (required)>’ Tasks: TOP => ts:index => environment
Everything worked fine before, but all of a sudden this search eror started to occur, and since the last line in the searhd log file is dated March 27, I suspect the behaviour is related to the upgrade.
Any hints on steps to resolve it?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.