SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Location
    Miami, FL
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ferret error on production.

    Hi everyone,

    I'm getting the following error (VERY randomly, I'd say 1/10 of the time when logging in or out, any user) when I log in or out of my app:

    Code Ruby:
    Processing SiteController#login (for 76.26.63.207 at 2007-12-22 17:52:31) [POST]
      Session ID: 073af041f2c731071cb576ec06a1663b
      Parameters: {"user"=>{"screen_name"=>"myusername", "password"=>"mypassword", "remember_me"=>"0"}, "commit"=>"Login!", "action"=>"login", "controller"=>"site"}
    Cookie set: remember_me=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT
    Cookie set: authorization_token=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT
     
     
    Ferret::FileNotFoundError (File Not Found Error occured at <except.c>:117 in xpop_context
    Error occured in fs_store.c:329 - fs_open_input
    	tried to open "/var/www/apps/rehashclothes/current/config/../index/production/user/_b_0.del" but it doesn't exist: <No such file or directory>
     
    ):

    It's very sporadic in when it happens, but that's the error I get. Sometimes I could go for 20 logins/logouts perfectly, then it'll just happen out of nowhere. Also, it's actually being completed (as in, I'm being logged in) so if I reload everything's OK.

    Any idea what's going on and a fix? Thanks!

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Location
    Miami, FL
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I figured out the problem, I'll post the solution in case it helps anyone else.

    Since I'm using 4 mongrels, each mongrel starts doing ferret things independently, so it doesn't know which file was deleted by another process. Since during development I didn't bother with mongrels, I never encountered this problem so I didn't know about DRb servers. The fix is pretty easy:

    Create a config/ferret_server.yml file (if you don't alrady have it) and place the following in there:
    Code Ruby:
    production:
      host: localhost
      port: 9010
      pid_file: log/ferret.pid

    Make sure your index directory is in Capistrano's shared directory.

    Then place the ":remote => true" option on your acts_as_ferret model calls. After that, run script/ferret_start -e production from your deploy user to start the server, and script/ferret_stop -e production to stop the server.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •