On 01/06/2010, at 8:32 PM, Alexander Sviridov wrote: > Hi Pat! > > On 01.06.2010, at 14:23, Pat Allan wrote: > >> Hi Alexander >> >> I'm not sure why there's issues with the connection - is Sphinx running? - > > Sphinx is running for sure. This error occurs only in a production mode, > under big load. Something system-specific maybe. I did a rollback to sphinx > 0.9.8 (was 0.9.9-release) and it seems to help.
I've heard of Sphinx struggling a little with high load, though for some it works fine. Not sure why. >> but what happens is that, on every update, TS queries the index for the >> model to see if the record exists there (this is why there's a call to >> populate), and if it *does* exist, it updates the attributes. > > There are queries to index on each update, even with delayed_delta? Am I > right? That's correct - some attributes (integers, booleans, timestamps) can be updated automatically, so TS does what it can, and won't fire off a delta update unless it needs to. And so, for each set of attribute updates, there's a search query to check for the record. -- Pat > > >> >> Hope this at least helps with understanding the issue, even though it >> doesn't fix it. > > Thanks :) > > >> -- >> Pat >> >> On 31/05/2010, at 4:49 AM, Alexander Sviridov wrote: >> >>> Hello! >>> >>> Recently switched to TS 1.3.16 w/delayed_deltas and now I'm having strange >>> problem. Looks like >>> populate() is invoked on every update of the indexed model (and failed). >>> >>> I have no idea what's happening and why :( >>> Is it normal that all this things happen, on attribute update? >>> >>> >>> Thank for your help! >>> >>> >>> >>> Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) >>> >>> [GEM_ROOT]/gems/riddle-1.0.10/lib/riddle/client.rb:512:in `initialize' >>> [GEM_ROOT]/gems/riddle-1.0.10/lib/riddle/client.rb:512:in `new' >>> [GEM_ROOT]/gems/riddle-1.0.10/lib/riddle/client.rb:512:in >>> `initialise_socket' >>> [GEM_ROOT]/gems/riddle-1.0.10/lib/riddle/0.9.9/client.rb:8:in >>> `initialise_connection' >>> [GEM_ROOT]/gems/riddle-1.0.10/lib/riddle/client.rb:452:in `open_socket' >>> [GEM_ROOT]/gems/riddle-1.0.10/lib/riddle/client.rb:479:in `connect' >>> [GEM_ROOT]/gems/riddle-1.0.10/lib/riddle/client.rb:535:in `request' >>> [GEM_ROOT]/gems/riddle-1.0.10/lib/riddle/client.rb:203:in `run' >>> [GEM_ROOT]/gems/riddle-1.0.10/lib/riddle/client.rb:310:in `query' >>> [GEM_ROOT]/gems/thinking-sphinx-1.3.16/lib/thinking_sphinx/search.rb:266:in >>> `populate' >>> [GEM_ROOT]/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:10:in >>> `realtime' >>> [GEM_ROOT]/gems/thinking-sphinx-1.3.16/lib/thinking_sphinx/search.rb:265:in >>> `populate' >>> [GEM_ROOT]/gems/thinking-sphinx-1.3.16/lib/thinking_sphinx/search.rb:388:in >>> `call' >>> [GEM_ROOT]/gems/thinking-sphinx-1.3.16/lib/thinking_sphinx/search.rb:388:in >>> `retry_on_stale_index' >>> [GEM_ROOT]/gems/thinking-sphinx-1.3.16/lib/thinking_sphinx/search.rb:262:in >>> `populate' >>> [GEM_ROOT]/gems/thinking-sphinx-1.3.16/lib/thinking_sphinx/search.rb:118:in >>> `method_missing' >>> [GEM_ROOT]/gems/thinking-sphinx-1.3.16/lib/thinking_sphinx/search_methods.rb:395:in >>> `search_for_id' >>> [GEM_ROOT]/gems/thinking-sphinx-1.3.16/lib/thinking_sphinx/active_record/attribute_updates.rb:28:in >>> `update_attribute_values' >>> [GEM_ROOT]/gems/thinking-sphinx-1.3.16/lib/thinking_sphinx/active_record/attribute_updates.rb:19:in >>> `each' >>> [GEM_ROOT]/gems/thinking-sphinx-1.3.16/lib/thinking_sphinx/active_record/attribute_updates.rb:19:in >>> `update_attribute_values' >>> [GEM_ROOT]/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:178:in >>> `send' >>> [GEM_ROOT]/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:178:in >>> `evaluate_method' >>> [GEM_ROOT]/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:166:in >>> `call' >>> [GEM_ROOT]/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:93:in >>> `run' >>> [GEM_ROOT]/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:92:in >>> `each' >>> [GEM_ROOT]/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:92:in >>> `send' >>> [GEM_ROOT]/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:92:in >>> `run' >>> [GEM_ROOT]/gems/activesupport-2.3.4/lib/active_support/callbacks.rb:276:in >>> `run_callbacks' >>> [GEM_ROOT]/gems/activerecord-2.3.4/lib/active_record/callbacks.rb:344:in >>> `callback' >>> [GEM_ROOT]/gems/after_commit-1.0.7/lib/after_commit/connection_adapters.rb:129:in >>> `send' >>> [GEM_ROOT]/gems/after_commit-1.0.7/lib/after_commit/connection_adapters.rb:129:in >>> `trigger_after_commit_callbacks' >>> [GEM_ROOT]/gems/after_commit-1.0.7/lib/after_commit/connection_adapters.rb:128:in >>> `each' >>> [GEM_ROOT]/gems/after_commit-1.0.7/lib/after_commit/connection_adapters.rb:128:in >>> `trigger_after_commit_callbacks' >>> [GEM_ROOT]/gems/after_commit-1.0.7/lib/after_commit/connection_adapters.rb:36:in >>> `commit_db_transaction' >>> [GEM_ROOT]/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:159:in >>> `transaction_without_callback' >>> [GEM_ROOT]/gems/after_commit-1.0.7/lib/after_commit/connection_adapters.rb:12:in >>> `transaction' >>> [GEM_ROOT]/gems/activerecord-2.3.4/lib/active_record/transactions.rb:182:in >>> `transaction_without_trace_ActiveRecord_self_name_transaction' >>> [PROJECT_ROOT]/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:319:in >>> `transaction' >>> [PROJECT_ROOT]/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:141:in >>> `trace_execution_scoped' >>> [PROJECT_ROOT]/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:314:in >>> `transaction' >>> [GEM_ROOT]/gems/activerecord-2.3.4/lib/active_record/transactions.rb:228:in >>> `with_transaction_returning_status' >>> [GEM_ROOT]/gems/activerecord-2.3.4/lib/active_record/transactions.rb:196:in >>> `save' >>> [GEM_ROOT]/gems/activerecord-2.3.4/lib/active_record/transactions.rb:208:in >>> `rollback_active_record_state!' >>> [GEM_ROOT]/gems/activerecord-2.3.4/lib/active_record/transactions.rb:196:in >>> `save' >>> [GEM_ROOT]/gems/activerecord-2.3.4/lib/active_record/base.rb:2627:in >>> `update_attributes' >>> [PROJECT_ROOT]/app/models/tag.rb:29:in `update_weight' >>> [PROJECT_ROOT]/app/models/tag.rb:26:in `each' >>> [PROJECT_ROOT]/app/models/tag.rb:26:in `update_weight' >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Thinking Sphinx" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/thinking-sphinx?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Thinking Sphinx" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/thinking-sphinx?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
