Timeout when rebuilding index

Sorry to post twice in a row, but I also wanted help with my index
rebuild process - I seem to be getting timeouts when I run the
rebuild_index.rb script, like this:

/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract_adapter.rb:120:in
log': Mysql::Error: Lost connection to MySQL server during query: SELECT * FROM search_queries (ActiveRecord::StatementInvalid) from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:185:inexecute’
from
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:337:in
`select’

deprecated_finders.rb:37:in `find_all’
from rebuild_index.rb:12

To give some context: this is the rebuild_index script which lives in
vendor/plugins/acts_as_ferret, and it’s working on a single table with 6
columns in it, and approx. 200 meg of data.

This table is mapped onto a single Model, which uses acts_as_ferret in
(what I think) is a very straightforward fashion - just the fields and
boosts.

Happy to give table definition if you think that’s important…

What am I doing wrong - is Ferret not meant for this sort of
application?

Thanks,

Alex

On Fri, Aug 11, 2006 at 12:52:00AM +0200, Alex Dean wrote:

    from 

columns in it, and approx. 200 meg of data.

This table is mapped onto a single Model, which uses acts_as_ferret in
(what I think) is a very straightforward fashion - just the fields and
boosts.

You shouldn’t use that rebuild_index script any more - it has been
removed from recent versions of the plugin and was replaced by a
class method named rebuild_index. Just call this (via
YourModel.rebuild_index) to rebuild your index.

Maybe the problem with your query is simply the amount of data fetched
by find_all (how many rows does your table have?). Version 0.2.2 of the
plugin does a chunked index rebuild (fetching 1000 rows at a time, then
indexing these, and so on).

See http://projects.jkraemer.net/acts_as_ferret/wiki for more
information on versions of the plugin, their compatibility with Ferret
versions and how to install them.

[…]

What am I doing wrong - is Ferret not meant for this sort of
application?

Don’t see what you could be doing wrong - maybe your mysql server logs
state something meaningful ?

Regards,
Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs