Version 0.6.0: beaker.exceptions.BeakerException: Cache region not configured: long_term_file

Issue #373 resolved
Austin Collier created an issue

I ran into this upgrading to the new 0.6.0 version from 0.5.2. Whenever I would load a repo page I’d get a 500 error and the following would happen:

beaker.exceptions.BeakerException: Cache region not configured: long_term_file

I created a brand new config from kallithea-cli and I still had this error. I fixed it by doing the following in my config file (which should probably be added to the default config)

# change this line from
beaker.cache.regions = short_term,long_term,sql_cache_short
# to
beaker.cache.regions = short_term,long_term,long_term_file,sql_cache_short

# and add
beaker.cache.long_term_file.type = file
beaker.cache.long_term_file.expire = 36000
beaker.cache.long_term_file.key_length = 256
#beaker.cache.long_term_file.data_dir = /opt/kallithea-cache/cache
#beaker.cache.long_term_file.lock_dir = /opt/kallithea-cache/lock

Comments (4)

  1. Thomas De Schampheleire

    The code in kallithea is actually correct and kallithea-cli config-create from 0.6.0 will produce a config file without sql_cache_short and with long_term_file.

    The fact that you see this behavior is a sign that the kallithea-cli you are executing is not actually one from a 0.6.0 installation.

    Can you describe the procedure you use to install, and also run 'which kallithea-cli' in the same window as where you can reproduce this invalid config?

    If you start from the kallithea source code repo, note that kallithea-cli is not present directly in source form, it is generated by setup.py. So if you started from an existing virtualenv used in an old installation, then updated the kallithea repo, but without running setup.py, then you'd still see an old kallithea-cli.

  2. Austin Collier reporter

    Well I’ll be darned, you are right and I’m happy to be wrong 🙂 It was pulling from /usr/bin/kallithea-cli and not from the 0.6.0 version. The new config shows the appropriate stuff in there too.

  3. Thomas De Schampheleire

    To help identifying such issues more easily, we changed the ini file generation so that the version of kallithea is added in the comment near the top. This will be released in 0.6.1 soon.

  4. Log in to comment