Forum: Ferret Ferret Locking issues

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
17a97e09a1b23bc733ae22880a961b59?d=identicon&s=25 W S (Guest)
on 2007-01-11 13:46
Dave and all,

I run a medium RoR app using Ferret and acts_as_ferret. I get a lot of
lock errors. Not always but around 5% of all searches (aspecially during
peak periods). Here are the messages I get:

A NameError occurred in szukaj#index:
uninitialized constant Ferret::Index::Index::LockError
 /home/user/.gems/gems/ferret-0.10.13/lib/ferret/index.rb:383:in `[]'
 /usr/lib/ruby/1.8/monitor.rb:238:in `synchronize'
 /home/user/.gems/gems/ferret-0.10.13/lib/ferret/index.rb:382:in `[]'
 /usr/lib/ruby/1.8/monitor.rb:238:in `synchronize'
 [RAILS_ROOT]/app/controllers/szukaj_controller.rb:38:in `index'

As you can see I use ferret 0.10.13.

I read:
but obviously it didn't help much. Is it possible to disable locking
when searching? The index is updated once per week at most...
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2007-01-11 14:14
(Received via mailing list)
On Thu, Jan 11, 2007 at 01:46:06PM +0100, W S wrote:
>  /home/user/.gems/gems/ferret-0.10.13/lib/ferret/index.rb:674:in
> `ensure_reader_open'

this actually means that the LockError class could not be found in line
674, which is a rescue statement.

Replacing LockError with Lock::LockError in line 674 of index.rb should
help to
solve that. Then you'll probably see what's really going on. Please tell
us if this gets you any further.


webit! Gesellschaft für neue Medien mbH
Dipl.-Wirtschaftsingenieur Jens Krämer
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
This topic is locked and can not be replied to.