ECONNRESET (Connection reset by peer - recvfrom(2))

1,182 views
Skip to first unread message

UnConundrum

unread,
Jun 22, 2011, 8:44:15 AM6/22/11
to Thinking Sphinx
I've been working on adding Thinking Sphinx to a project, but got
called away for a few months. When I last worked on it, I had a
simple search working with one model... and was quite happy with it.
Today, I finally got back to the project, recreated my index and got a
communications error. I changed my sql port to 3306, which seems to
have helped that problem, but now I have this "Conneciton reset by
peer" issue. Looking at the log, it appear that TS communicated with
mySql, and pulled some results and then the error occurred.

Any suggestions?


Processing MatterHistoriesController#search (for 127.0.0.1 at
2011-06-22 12:38:12) [POST]
Parameters: {"matter_history_type_id"=>"1", "commit"=>"Filter
History", "action"=>"search", "amount"=>"recent",
"matter_id"=>"10912", "history_search_terms"=>"satan",
"controller"=>"matter_histories", "_"=>""}
[4;35;1mUser Columns (2.0ms) [0m [0mSHOW FIELDS FROM `users` [0m
[4;36;1mUser Load (0.3ms) [0m [0;1mSELECT * FROM `users` WHERE
(`users`.`id` = 17 AND `users`.`is_active` = 1) LIMIT 1 [0m
[4;35;1mIntranet Columns (1.3ms) [0m [0mSHOW FIELDS FROM
`intranets` [0m
[4;36;1mIntranet Load (0.2ms) [0m [0;1mSELECT * FROM `intranets`
WHERE (`intranets`.`id` = 1) [0m
[4;35;1mMatter Columns (1.6ms) [0m [0mSHOW FIELDS FROM
`matters` [0m
[4;36;1mMatter Load (0.2ms) [0m [0;1mSELECT * FROM `matters`
WHERE (`matters`.`id` = 10912 AND (`matters`.intranet_id = 1)) [0m
[4;35;1musers_groups Columns (1.2ms) [0m [0mSHOW FIELDS FROM
`users_groups` [0m
[4;36;1mGroup Load (0.2ms) [0m [0;1mSELECT * FROM `groups` INNER
JOIN `users_groups` ON `groups`.id = `users_groups`.group_id WHERE
(`users_groups`.user_id = 17 ) [0m
[4;35;1mGroup Columns (0.7ms) [0m [0mSHOW FIELDS FROM
`groups` [0m
[4;36;1mSQL (1.9ms) [0m [0;1mSHOW TABLES [0m
[4;35;1mMatterHistory Columns (1.3ms) [0m [0mSHOW FIELDS FROM
`matter_histories` [0m
[4;32;1mSphinx [0m [0mQuerying: 'satan' [0m

Errno::ECONNRESET (Connection reset by peer - recvfrom(2)):
riddle (1.3.2) lib/riddle/client.rb:639:in `recv'
riddle (1.3.2) lib/riddle/client.rb:639:in `request'

Pat Allan

unread,
Jun 22, 2011, 8:54:10 AM6/22/11
to thinkin...@googlegroups.com
Hi there

The error's actually from TS communicating with Sphinx - is there a longer stack trace available?

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
>

UnConundrum

unread,
Jun 22, 2011, 11:18:31 AM6/22/11
to Thinking Sphinx
I believe this would be it all:




Processing MatterHistoriesController#search (for 127.0.0.1 at
2011-06-22 13:13:34) [POST]
Parameters: {"matter_history_type_id"=>"1", "commit"=>"Filter
History", "action"=>"search", "amount"=>"recent",
"matter_id"=>"10912", "history_search_terms"=>"Susan",
"controller"=>"matter_histories", "_"=>""}
[4;35;1mUser Columns (2.1ms) [0m [0mSHOW FIELDS FROM `users` [0m
[4;36;1mUser Load (0.5ms) [0m [0;1mSELECT * FROM `users` WHERE
(`users`.`id` = 17 AND `users`.`is_active` = 1) LIMIT 1 [0m
[4;35;1mIntranet Columns (1.6ms) [0m [0mSHOW FIELDS FROM
`intranets` [0m
[4;36;1mIntranet Load (0.3ms) [0m [0;1mSELECT * FROM `intranets`
WHERE (`intranets`.`id` = 1) [0m
[4;35;1mMatter Columns (1.4ms) [0m [0mSHOW FIELDS FROM
`matters` [0m
[4;36;1mMatter Load (0.3ms) [0m [0;1mSELECT * FROM `matters`
WHERE (`matters`.`id` = 10912 AND (`matters`.intranet_id = 1)) [0m
[4;35;1musers_groups Columns (1.1ms) [0m [0mSHOW FIELDS FROM
`users_groups` [0m
[4;36;1mGroup Load (0.3ms) [0m [0;1mSELECT * FROM `groups` INNER
JOIN `users_groups` ON `groups`.id = `users_groups`.group_id WHERE
(`users_groups`.user_id = 17 ) [0m
[4;35;1mGroup Columns (0.9ms) [0m [0mSHOW FIELDS FROM
`groups` [0m
[4;36;1mSQL (2.2ms) [0m [0;1mSHOW TABLES [0m
[4;35;1mMatterHistory Columns (1.2ms) [0m [0mSHOW FIELDS FROM
`matter_histories` [0m
[4;32;1mSphinx [0m [0mQuerying: 'Susan' [0m

Errno::ECONNRESET (Connection reset by peer - recvfrom(2)):
riddle (1.3.2) lib/riddle/client.rb:639:in `recv'
riddle (1.3.2) lib/riddle/client.rb:639:in `request'
riddle (1.3.2) lib/riddle/client.rb:532:in `connect'
riddle (1.3.2) lib/riddle/client.rb:619:in `request'
riddle (1.3.2) lib/riddle/client.rb:226:in `run'
riddle (1.3.2) lib/riddle/client.rb:333:in `query'
/Users/wprince/.rvm/gems/ruby-1.8.7-p302/gems/thinking-sphinx-1.4.4/
lib/thinking_sphinx/search.rb:389:in `populate'
/Users/wprince/.rvm/gems/ruby-1.8.7-p302/gems/thinking-sphinx-1.4.4/
lib/thinking_sphinx/search.rb:388:in `populate'
/Users/wprince/.rvm/gems/ruby-1.8.7-p302/gems/thinking-sphinx-1.4.4/
lib/thinking_sphinx/search.rb:540:in `call'
/Users/wprince/.rvm/gems/ruby-1.8.7-p302/gems/thinking-sphinx-1.4.4/
lib/thinking_sphinx/search.rb:540:in `retry_on_stale_index'
/Users/wprince/.rvm/gems/ruby-1.8.7-p302/gems/thinking-sphinx-1.4.4/
lib/thinking_sphinx/search.rb:385:in `populate'
/Users/wprince/.rvm/gems/ruby-1.8.7-p302/gems/thinking-sphinx-1.4.4/
lib/thinking_sphinx/search.rb:167:in `method_missing'
app/controllers/matter_histories_controller.rb:165:in `search'
app/controllers/matter_histories_controller.rb:164:in `search'
app/controllers/matter_histories_controller.rb:162:in `search'

Rendered rescues/_trace (37.8ms)
Rendered rescues/_request_and_response (0.2ms)
Rendering rescues/layout (internal_server_error)
[4;36;1mSQL (0.1ms) [0m [0;1mSET SQL_AUTO_IS_NULL=0 [0m

Pat Allan

unread,
Jun 22, 2011, 9:54:04 PM6/22/11
to thinkin...@googlegroups.com
Is this error happening constantly? What happens when you restart Sphinx?

--
Pat

UnConundrum

unread,
Jun 22, 2011, 10:41:17 PM6/22/11
to Thinking Sphinx
Yes, every time I try to search. BTW, it indexes without error.

Well, as I was writing this, I was about to ask how to restart sphinx,
but did a ps aux | grep sphinx and noticed searchd. I stopped
searchd, but when I tried to restart it, I got errors about the config
file. I used the -c switch to point to the config file, restarted
mongrel, and all seems fine. I added the path to the config file to
my sphinx.yaml so I guess it will find it in the future without
intervention by me?

Pat Allan

unread,
Jun 22, 2011, 10:45:45 PM6/22/11
to thinkin...@googlegroups.com
You'll want to manage it using the TS rake tasks - saves you having to worry about paths and killing the process manually:

rake ts:start
rake ts:stop
# or
rake ts:restart

There's also ts:rebuild, which stops Sphinx (if it's running), re-indexes, and then restarts Sphinx.

Cheers

--
Pat

Aaron Gibralter

unread,
Jan 9, 2012, 9:10:04 AM1/9/12
to thinkin...@googlegroups.com
I also am seeing these errors from time to time and am having trouble figuring out what I can do about them. Below is my backtrace. Any clues?

vendor/bundle/ruby/1.9.1/gems/riddle-1.5.1/lib/riddle/0.9.9/client.rb:14:in `recv'

vendor/bundle/ruby/1.9.1/gems/riddle-1.5.1/lib/riddle/0.9.9/client.rb:14:in `initialise_connection'

vendor/bundle/ruby/1.9.1/gems/riddle-1.5.1/lib/riddle/client.rb:499:in `open_socket'

vendor/bundle/ruby/1.9.1/gems/riddle-1.5.1/lib/riddle/client.rb:536:in `connect'

vendor/bundle/ruby/1.9.1/gems/riddle-1.5.1/lib/riddle/client.rb:623:in `request'

vendor/bundle/ruby/1.9.1/gems/riddle-1.5.1/lib/riddle/client.rb:423:in `update'

vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/active_record/attribute_updates.rb:44:in `update_index'

vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/active_record/attribute_updates.rb:23:in `block in update_attribute_values'

vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/active_record/attribute_updates.rb:16:in `each'

vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.11/lib/thinking_sphinx/active_record/attribute_updates.rb:16:in `update_attribute_values'

vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:476:in `_run_save_callbacks'

vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:81:in `run_callbacks'

vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/callbacks.rb:264:in `create_or_update'

vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/persistence.rb:57:in `save!'

vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/validations.rb:56:in `save!'

vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/attribute_methods/dirty.rb:33:in `save!'

vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/transactions.rb:246:in `block in save!'

vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'

vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'

vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/transactions.rb:208:in `transaction'

vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.3.1/lib/new_relic/agent/method_tracer.rb:491:in `block in transaction_with_trace_ActiveRecord_self_name_transaction'

vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.3.1/lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'

vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.3.1/lib/new_relic/agent/method_tracer.rb:486:in `transaction_with_trace_ActiveRecord_self_name_transaction'

vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'

vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/transactions.rb:246:in `save!'

app/models/response.rb:124:in `block (2 levels) in create_with_attributes!'

Reply all
Reply to author
Forward
0 new messages