[Nitro] Error when using lighttpd + Nitro file caching

Lars Olsson lasso at lassoweb.se
Thu Jan 11 04:11:54 EST 2007


Some more info:

The problems persisted even when I switched to mongrel, so the problems
isn't related to lighttpd.

After looking through /glue/lib/glue/cache/file.rb I see that no checks
whatsoever is performed when encode_file or decode_file gets called. The
file is assumed to always exist and always be readable/writable which is
rather optimistic, especially when the cache file lives somewhere under
/tmp.

I can make a patch that add some file system checks, but it's a bit
unclear to me what to do if the file is unexistent/unreadable/unwritable.

Some possible cases:

1. File doesn't exist:
Suggestion: Session has expired, create a new file.

2. File exists but is unreadable (existing session)
Suggestion: This could happen if the session file gets corrupted somehow.
Create a new file.

3. File exists but is unwritable (existing session)
Suggestion: Same as 2.

What do you think?


Sincerely

/lasso




More information about the Nitro-general mailing list