I''ve installed the ferret gem. I installed AAF as a plugin into my vendor/plugins directory of my project. In development environment my searches work just fine, without any problems. For production I configured the ferret_server.yml file with correct information about the machine my DRb server is running on. I start the ferret server with the following command: ruby script/runner ''load "script/ferret_start"'' The DRb server seems to be starting fine. I get: Starting ferret DRb server...Done. But when I run a top, I see that my ruby process that I started ferret_server in is sitting at 95 to 99% at all times. This happens with no load on the server. Basically it seems that the DRb server is in some sort of endless loop. Any search request just blocks and doesn''t come back. But as soon as I kill the DRb ruby process, I get a connection error, which tell me that the search was waiting for the server to finish doing whatever it''s doing. Even when I run the stop script, I get: Stopping ferret_server... Sending TERM to ferret_server with PID #...Done. But the process that started the DRb server doesn''t quit and still sits at 90 percentile range. I tried to look at the ferret log files (ferret_server.log and ferret_server.out and ferret_index.log), but there is nothing in there. Just the creation date. I checked my environment.rb and I don''t have anything that recursively loads my modules. I let the server run overnight, thinking that it is indexing my DB but it still didn''t come back. With local index files and not DRb server, it takes ferret, at most, 15 minutes to index my DB. I can''t think of anything else to check or make sure of. Does anyone have any idea what''s going on? Ruby 1.8.5 Rails 1.1.6 Ferret 0.11.4 Latest version of AAF as of this writing. Thanks alot. -- Posted via http://www.ruby-forum.com/.
On Tue, May 01, 2007 at 06:45:49PM +0200, Ben wrote:> I''ve installed the ferret gem. I installed AAF as a plugin into my > vendor/plugins directory of my project. In development environment my > searches work just fine, without any problems. > > For production I configured the ferret_server.yml file with correct > information about the machine my DRb server is running on. I start the > ferret server with the following command: > > ruby script/runner ''load "script/ferret_start"'' > > The DRb server seems to be starting fine. I get: > > Starting ferret DRb server...Done. > > But when I run a top, I see that my ruby process that I started > ferret_server in is sitting at 95 to 99% at all times. This happens with > no load on the server. Basically it seems that the DRb server is in some > sort of endless loop. Any search request just blocks and doesn''t come > back. But as soon as I kill the DRb ruby process, I get a connection > error, which tell me that the search was waiting for the server to > finish doing whatever it''s doing.Recently a similar problem came up because AR models were explicitly required in environment.rb. Could you please try AAF trunk and start your server with FERRET_USE_LOCAL_INDEX=1 ruby script/runner ''load "script/ferret_start"'' This explicitly tells the server that it *is* the server and therefore should use the local index. Jens -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
Jens Kraemer wrote:> Recently a similar problem came up because AR models were explicitly > required in environment.rb. Could you please try AAF trunk and start > your server with > > FERRET_USE_LOCAL_INDEX=1 ruby script/runner ''load "script/ferret_start"'' > > This explicitly tells the server that it *is* the server and therefore > should use the local index.That does it! It works now. I checked my environment.rb and I couldn''t find any statements that required any of my models. I don''t know what was happening before. I guess the trunk code has some fixes and tweaks, being the latest development snapshot. Thanks for your quick response and great job on the AAF plugin. This is how good written code should be, simple and functional. Thanks, Ben -- Posted via http://www.ruby-forum.com/.