Project

General

Profile

Actions

Task #12827

closed

Configure CKAN to store .cache files (that are session info) in memory

Added by Francesco Mangiacrapa over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
_InfraScience Systems Engineer
Category:
Application
Target version:
Start date:
Nov 06, 2018
Due date:
% Done:

100%

Estimated time:
Infrastructure:
Development, Production

Description

@tommaso.piccioli@isti.cnr.it has noticed under '/tmp/[ckan_name]/sessions' directory that milions of file are created by CKAN.
Investigating the issue we have found (from https://lists.okfn.org/pipermail/ckan-dev/2015-February/008648.html) the following one:

The cache directory or the session directory is only used for stuff that is not saved in the database.  
It is always safe to remove.  It is only used for very temporary data.
CKAN only uses it in fact to store the little popup messages that come up after you are redirected to a new page.

... but those files are never deleted.

We need and can (in order to avoid filling the disk) to pass from caching on disk to cacking in memory by installing
and configuring memcached (see at https://github.com/memcached/memcached) for pylons and beaker.

How to install and use it:

https://stackoverflow.com/questions/13781023/how-to-configure-ckan-to-store-sessions-somewhere-other-than-disk-e-g-db-or-me

https://beaker.readthedocs.io/en/latest/sessions.html#deleting

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 8.91 MB)