I'm just being brought on to the project to replace the previous developer. The name of the app is projectalert - accessible at http://projectalert.com. As far as I know it was operational previously - at the very least prior to last evening when a small update was pushed up (just replacing some image files).
I'll go ahead and update those gems - which should also necessitate a Ruby version upgrade since it is currently running on 1.8.7.
I'll let you know once I've been able to do this, thanks!
I was able to get the gems for thinking-sphinx and flying-sphinx updated to 1.5 and 1.2, respectively. Unfortunately I'm running into the same issue and in addition, when I try to run `heroku run rake fs:rebuild` I'm getting the following error:
Pusher : error : #<NoMethodError: undefined method `read_nonblock' for #<OpenSSL::SSL::SSLSocket:0x7f9d25f5bcd8>>
I've included openssl-nonblock in my Gemfile as well, is there any guidance you can offer?
Pat Allan on 08 Sep, 2015 06:18 PM
Just to confirm: you're still seeing the read_nonblock error
with the openssl-nonblock in place? This is certainly unexpected.
Is adding me to the project to debug directly an option? (My Heroku
account is pat at freelancing-gods dot com). If it's not, that's
completely understandable… I'll ponder further about what
could be the cause…
Pat Allan on 08 Sep, 2015 06:23 PM
Also, it's worth noting that the daemon is running on Flying
Sphinx, and indexing calls have been coming through daily, so it
feels like this is very much an issue with the app and its
interaction with the Thinking Sphinx and Flying Sphinx gems. What's
in your config/sphinx.yml file for the relevant
environment (if the file doesn't exist, that's fine)? And are there
any initialisers mucking about with Thinking Sphinx settings?
Yes, I'm still getting the read_nonblock error with the
openssl-nonblock in place. I just tried to run rake
fs:index and I got the following output:
Executing Action: configure
SQL (0.7ms) SET client_min_messages TO 'panic'
SQL (0.7ms) SET standard_conforming_strings = on
SQL (0.6ms) SET client_min_messages TO 'notice'
can't convert nil into String
But the other actions, like :rebuild and :start both result in
the non_block error.
I totally agree with you about the app and its interaction, I'm
just not sure what to change to remedy this situation. The
config/sphinx.yml file is actually in .gitignore, so
I'm not 100% sure what's going on with it in the production
environment. From what I got from the previous developer it has the
Pat Allan on 08 Sep, 2015 10:38 PM
I've no idea why this is the case, but it seems as if Flying
Sphinx is not being required, even though it's in the Gemfile and
One way to work around this is to add an initializer that just
has require 'flying_sphinx' and see if that helps? I'm
hoping that resolves the wrong Sphinx address/port issue.
As for the openssl_nonblock - can you try putting that gem above
both of the Sphinx gems in both the Gemfile and
config/environment.rb? Of course, perhaps its not being required
either - so it wouldn't hurt adding a require statement for it to
the same initializer, before the one for flying_sphinx.
I've not made any commits to test these changes on the app
itself, but when I run heroku run bundle exec
./script/console, both require 'flying_sphinx'
and require 'openssl_nonblock' return true, indicating
they're not already loaded.
I'm kind of assuming this is because I still need to run
rake fs:rebuild on the server, which I currently have
going now. If that's not the case let me know, either way I'll let
you know what I get after the rebuild finishes.
It looks like some of the tasks I'm trying to run are timing
out. I started running rake fs:rebuild and it seemed
like it wasn't moving or doing anything (about an hour). I aborted
the task and tried both rake fs:index, rake
fs:start and even rake fs:stop and both
returned this output:
Action timed out. If this is happening regularly, please
contact Flying Sphinx support:
Both had the 'Executing Action: *' and 'Action Finished: *`
preceding the time out message.
Pat Allan on 09 Sep, 2015 01:31 AM
So, since flying-sphinx 1.0, websockets are used instead of polling to track when a task has finished. Annoyingly, it looks like it’s flaky with 1.8.7, even with openssl_nonblock (it would generally work for me in the past, but now it seems almost never. *sigh*)
So, can you try downgrading to flying-sphinx 0.7.1 (from memory, the 0.8.x releases weren’t 1.8.7-friendly) and see how things go from there?