Kallithea issues archive

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

Reported by: Austin Collier
State: resolved
Created on: 2020-05-20 15:30
Updated on: 2020-06-05 07:36

Description

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

Attachments

Comments

Comment by Thomas De Schampheleire, on 2020-05-20 16:28

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.

Comment by Austin Collier, on 2020-05-20 17:23

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.

Comment by Austin Collier, on 2020-05-20 17:23