incompatible marshal file format

Hi,

I’ve written a RoR application that I would like to be able to deploy more
widely, but I’m running into a rather peculiar problem with it.

First, some context. Here’s what I’ve got installed:

actionmailer (1.3.3)
actionpack (1.13.3)
actionwebservice (1.2.3)
activerecord (1.15.3)
activesupport (1.4.2)
fcgi (0.8.7)
mime-types (1.15)
rails (1.2.3)
rake (0.7.3)
sources (0.0.1)
sqlite3-ruby (1.2.1)
unicode (0.1)
ruby 1.8.4 (2005-12-24) [i386-freebsd6]

In my application, I’m generating a home page for my own use, that has on it
some useful links plus schedule info and news. So, while there are other pages

in the app, mostly, my browser is sitting on one particular page all the time.
Because the page content changes over time, I have this statement in the HEAD
section of the .rhtml

<meta http-equiv="refresh" content="600">

causing the page to be reloaded every 10 minutes. I have this same page up on
a number of machines in my office, so each of them refreshes every 10 minutes,
at staggered times.

I only have one plugin installed: acts_as_authenticated (most recent comment in

the CHANGELOG is 1 Aug 2006. Freshly downloaded). This page
requires a username and password to access, and aaa is how I do that. Once
logged in, the page can be accessed as much as you like without
reauthentication.

This arrangement works fine for days at a time, but every once in a while,
the whole thing spazzes out with this error:

TypeError (incompatible marshal file format (can’t be read)
format version 4.8 required; 47.117 given):
/usr/local/lib/ruby/1.8/pstore.rb:353:in load' /usr/local/lib/ruby/1.8/pstore.rb:353:in load’
/usr/local/lib/ruby/1.8/pstore.rb:306:in transaction' /usr/local/lib/ruby/1.8/cgi/session/pstore.rb:90:in update’

/usr/local/lib/ruby/1.8/cgi/session/pstore.rb:97:in close' /usr/local/lib/ruby/1.8/cgi/session.rb:330:in close’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1184:in `close_session’

/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1228:in process_cleanup_without_flash' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/flash.rb:146:in process_cleanup_without_filters’

/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:662:in process_cleanup_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:124:in process_cleanup_without_components’

/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/components.rb:178:in process_cleanup' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:435:in process_without_filters’

/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in process’

/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in dispatch’
/usr/local/lib/ruby/gems/1.8/gems/rails-
1.2.3/lib/fcgi_handler.rb:168:in process_request' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:143:in process_each_request!’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:109:in `with_signal_handler’

/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:142:in process_each_request!' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:612:in each_cgi’
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:609:in `each_cgi’

/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:141:in process_each_request!' /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:55:in process!’
/usr/local/lib/ruby/gems/1.8/gems/rails-
1.2.3/lib/fcgi_handler.rb:25:in `process!’
/home/homepage/public/dispatch.fcgi:24

Once it spazzes, the server (lighttpd, running with fastCGI from a shell as
“script/server” while I’m developing) is useless and must be restarted. The

pages that were active when this happens get only garbage. Refreshing them
gets more garbage. Killing and restarting the server fixes everything, for the
moment.

By lowering the time in the META directive, I can make it happen faster, but

never consistently. It still takes the better part of a day to occur. There
are no database writes happening here, so it should not be a contention issue
there.

The only thing that I can think of is that I am logged in as the same user on

each machine, and somehow RoR is trying to update the same session file for
each different session, and two or more sessions are colliding in this,
trashing the file. However, the fact that killing and restarting the server

works (and doesn’t require relogin, just refresh), suggests that the session
files are not trashed, so the problem is likely elsewhere.

Any thoughts? All constructive help is greatly appreciated!

–Tom