Raj Singh
2006-Oct-17 12:21 UTC
[Ferret-talk] Error : End-of-File Error occured at <except.c>
Everything was working fine till last night. This morning I have many errors. I am using acts_as_ferret. Last updated around a month ago on linux. There are two different type of exceptions. I have over 12 exception emails but these are the two distince types. First exception: A EOFError occurred in home#event_info: End-of-File Error occured at <except.c>:79 in xraise Error occured in store.c:216 - is_refill current pos = 778, file length = 778 /usr/local/lib/ruby/site_ruby/1.8/ferret/index.rb:517:in `close'' Second exception: A Ferret::Store::Lock::LockError occurred in home#event_info: Lock Error occured at <except.c>:103 in xpop_context Error occured in index.c:5372 - iw_open Couldn''t obtain write lock when opening IndexWriter /usr/local/lib/ruby/site_ruby/1.8/ferret/index.rb:656:in `initialize'' -- Posted via http://www.ruby-forum.com/.
Charlie Hubbard
2006-Oct-17 14:43 UTC
[Ferret-talk] Error : End-of-File Error occured at <except.c>
Try rebuilding your index like the following:> ruby script/console>> MyModel.rebuild_indexCharlie Raj Singh wrote:> Everything was working fine till last night. This morning I have many > errors. > I am using acts_as_ferret. Last updated around a month ago on linux. > There are two different type of exceptions. I have over 12 exception > emails but these are the two distince types. > > First exception: > > A EOFError occurred in home#event_info: > > End-of-File Error occured at <except.c>:79 in xraise > Error occured in store.c:216 - is_refill > current pos = 778, file length = 778 > > > /usr/local/lib/ruby/site_ruby/1.8/ferret/index.rb:517:in `close'' > > > Second exception: > A Ferret::Store::Lock::LockError occurred in home#event_info: > > Lock Error occured at <except.c>:103 in xpop_context > Error occured in index.c:5372 - iw_open > Couldn''t obtain write lock when opening IndexWriter > > > /usr/local/lib/ruby/site_ruby/1.8/ferret/index.rb:656:in `initialize''-- Posted via http://www.ruby-forum.com/.
David Balmain
2006-Oct-17 15:27 UTC
[Ferret-talk] Error : End-of-File Error occured at <except.c>
On 10/17/06, Charlie Hubbard <charlie.hubbard at gmail.com> wrote:> > Try rebuilding your index like the following: > > > ruby script/console > > >> MyModel.rebuild_index >Good advice. Also make sure you have the latest version of Ferret. Version 0.10.10 will corrupt your index and eventually segfault.
Raj Singh
2006-Oct-17 17:40 UTC
[Ferret-talk] Error : End-of-File Error occured at <except.c>
It might sound stupid question but I don''t have an answer. How do I find what version of ferret is installed on my server. I couldn''t install ferret on windows and hence I use ferret installed on the hosting server. Is there a particular command that I could execute to find what version of Ferret is running or should I ask this question to the admin at hosting. Thanks David Balmain wrote:> On 10/17/06, Charlie Hubbard <charlie.hubbard at gmail.com> wrote: >> >> Try rebuilding your index like the following: >> >> > ruby script/console >> >> >> MyModel.rebuild_index >> > > Good advice. Also make sure you have the latest version of Ferret. > Version 0.10.10 will corrupt your index and eventually segfault.-- Posted via http://www.ruby-forum.com/.
The command is usually gem list --local This gives the version of all of the gems, in which ferret should be one of them.> From: Raj Singh <neeraj.jsr at gmail.com> > Reply-To: ferret-talk at rubyforge.org > Date: Tue, 17 Oct 2006 19:40:14 +0200 > To: ferret-talk at rubyforge.org > Subject: Re: [Ferret-talk] Error : End-of-File Error occured at <except.c> > > It might sound stupid question but I don''t have an answer. How do I find > what version of ferret is installed on my server. > > I couldn''t install ferret on windows and hence I use ferret installed on > the hosting server. Is there a particular command that I could execute > to find what version of Ferret is running or should I ask this question > to the admin at hosting. > > Thanks > > > David Balmain wrote: >> On 10/17/06, Charlie Hubbard <charlie.hubbard at gmail.com> wrote: >>> >>> Try rebuilding your index like the following: >>> >>>> ruby script/console >>> >>>>> MyModel.rebuild_index >>> >> >> Good advice. Also make sure you have the latest version of Ferret. >> Version 0.10.10 will corrupt your index and eventually segfault. > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >
Benjamin Krause
2006-Oct-17 18:45 UTC
[Ferret-talk] Error : End-of-File Error occured at <except.c>
Raj Singh schrieb:> It might sound stupid question but I don''t have an answer. How do I find > what version of ferret is installed on my server. > > I couldn''t install ferret on windows and hence I use ferret installed on > the hosting server. Is there a particular command that I could execute > to find what version of Ferret is running or should I ask this question > to the admin at hosting. >Hey .. There''re several ways.. if you installed ferret as gem (the suggested and default way) try: benjamin at home ~ $ gem list ferret *** LOCAL GEMS *** ferret (0.10.9) Ruby indexing library. If you installed it via svn checkout, try this: benjamin at home ~/trunk $ script/console Loading development environment.>> Ferret::VERSION=> "0.10.9" Ben
Raj Singh
2006-Oct-20 01:04 UTC
[Ferret-talk] Error : End-of-File Error occured at <except.c>
Thanks. Rebuilding the index solved the problem. I''m running ferret 0.10.9. -=-Raj Benjamin Krause wrote:> Raj Singh schrieb: >> It might sound stupid question but I don''t have an answer. How do I find >> what version of ferret is installed on my server. >> >> I couldn''t install ferret on windows and hence I use ferret installed on >> the hosting server. Is there a particular command that I could execute >> to find what version of Ferret is running or should I ask this question >> to the admin at hosting. >> > Hey .. > > There''re several ways.. if you installed ferret as gem (the suggested > and default way) try: > > benjamin at home ~ $ gem list ferret > > *** LOCAL GEMS *** > > ferret (0.10.9) > Ruby indexing library. > > > If you installed it via svn checkout, try this: > > benjamin at home ~/trunk $ script/console > Loading development environment. >>> Ferret::VERSION > => "0.10.9" > > > Ben-- Posted via http://www.ruby-forum.com/.
Raj Singh
2006-Oct-20 15:01 UTC
[Ferret-talk] Error : End-of-File Error occured at <except.c>
This problem is back and now I know the pattern. I rebuilt the index and things started working. Then I started adding events again to the application. After adding 60/70 events the problem was back. I got the exception because of End-of-File Error occured at <except.c> Then I rebuilt the index and it started working. Again I had the same issue after I added 50/60 records. Am I missing something here. I am using ferret 0.10.9 and the latest acts_as_ferret plugin. Thanks Raj Singh wrote:> Thanks. > > Rebuilding the index solved the problem. I''m running ferret 0.10.9. > > -=-Raj > > Benjamin Krause wrote: >> Raj Singh schrieb: >>> It might sound stupid question but I don''t have an answer. How do I find >>> what version of ferret is installed on my server. >>> >>> I couldn''t install ferret on windows and hence I use ferret installed on >>> the hosting server. Is there a particular command that I could execute >>> to find what version of Ferret is running or should I ask this question >>> to the admin at hosting. >>> >> Hey .. >> >> There''re several ways.. if you installed ferret as gem (the suggested >> and default way) try: >> >> benjamin at home ~ $ gem list ferret >> >> *** LOCAL GEMS *** >> >> ferret (0.10.9) >> Ruby indexing library. >> >> >> If you installed it via svn checkout, try this: >> >> benjamin at home ~/trunk $ script/console >> Loading development environment. >>>> Ferret::VERSION >> => "0.10.9" >> >> >> Ben-- Posted via http://www.ruby-forum.com/.
divotdave
2007-Feb-06 19:09 UTC
[Ferret-talk] Error : End-of-File Error occured at <except.c>
Raj Singh wrote:> This problem is back and now I know the pattern. > > I rebuilt the index and things started working. Then I started adding > events again to the application. After adding 60/70 events the problem > was back. I got the exception because of > > End-of-File Error occured at <except.c> > > Then I rebuilt the index and it started working. Again I had the same > issue after I added 50/60 records. > > Am I missing something here. I am using ferret 0.10.9 and the latest > acts_as_ferret plugin. > > ThanksIn case anybody comes across this thread...I had a similar problem, but discovered that is was happening because I was trying to write to my Model with update_attribute (updating a posting view stat) within the same method I was running the search from with AAF. The solution for me was to include a model.disable_ferret(:once) statement in the write procedure within my controller action so that AAF didn''t try to update the index (to a field that didn''t matter anyway, though I had explicitly excluded it from the :fields array in Model.rb) while running a search at the same time. So now my code looks like this: def search @models = Model.find_by_contents(''foo'') @models.each do |m| @model = Model.find(m.id) @model.disable_ferret(:once) @model.update_attribute(''views'', if @model.views == 0 then 1 else @views + 1 end) end end This also greatly improved my search speed. You can read more here -> http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage Hope this helps someone. -- Posted via http://www.ruby-forum.com/.
divotdave
2007-Feb-06 19:12 UTC
[Ferret-talk] Error : End-of-File Error occured at <except.c>
Ooops...> def search > @models = Model.find_by_contents(''foo'') > @models.each do |m| > @model = Model.find(m.id) > @model.disable_ferret(:once) > @model.update_attribute(''views'', if @model.views == 0 then 1 > else @views + 1 end) > end > end > > This also greatly improved my search speed. > > You can read more here -> > http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage > > Hope this helps someone.@views in the @model.update_attribute line should be @model.views... Should proof read better ;) -- Posted via http://www.ruby-forum.com/.
Reasonably Related Threads
- Automatic reindexing of associated columns acts_as_taggable
- disabling automatic indexing in acts_as_ferret
- Offline indexing issues
- Update/Create record only if field is true
- acts_as_ferret : cannot use a customized Analyzer (as indicated in the AdvancedUsageNotes)