Forum: Ferret Obtaining write lock when trying to write index error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6d104165db69b321bd441d1adeb7800c?d=identicon&s=25 Rest L. (moedusa)
on 2006-06-13 14:44
(Received via mailing list)
Haloo.

I've noticed some weird behaviour while trying ferret with rails
*without* act_as_ferret plugin: when I start application under
lighttpd proxying requests to spawned fcgi processes, I see this:

  : Error occured at :703 Error: exception 6 not handled: Could not
obtain write lock when trying to write index

The same time everything goes ok with webrick. Indexing part for the
model is as simple as

def index
    index = get_index
    index << to_ferret_document    #
[RAILS_ROOT]/lib/searchable_model.rb:5:in `<<'
    index.flush
    index.optimize
    index.close
  end

def get_index
    Ferret::Index::Index.new(:path =>
APP::CONFIG[:store_indexes_directory],
                             :analyzer =>
FerretConfig::CONTENT_ANALYZER,
                             :create_if_missing => true)
end

I supposed that working with index this way would be okay  (according
to http://ferret.davebalmain.com/trac/wiki/HowTos), but it looks like
i'v missed some kind of top-secret ferret config parameter maybe or
smth., so couldnt you share that trick with me ? (Iam sure every one
knows that). Thanks.

moe.
This topic is locked and can not be replied to.