CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • templates_c directory growing
Pages: [1]

Author Topic: templates_c directory growing  (Read 1112 times)

jkounis

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.20
  • MySQL version: 5.1
  • PHP version: 5.3
templates_c directory growing
May 01, 2011, 01:18:36 am
I'm running CiviCRM 3.3.5 on a site with low to moderate activity (less than 3,000 contacts, about 50 contributions per month). I recently noticed that my backups have been increasing every day.

The site has only been live for under a month, yet there more than 20,000 files in the templates_c directory are taking up nearly 200 MB of space.

I have cron jobs for processing civicrm mail (bounce handling and bulk mail), and the regular Drupal cron job. Is there another CiviCRM cron job I should be performing to clear these out? If not, is it safe to delete this directory every once in a while?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: templates_c directory growing
May 01, 2011, 01:27:26 am
You don't have to backup this directory and safe to delete it whenever you want. It will just take a bit more time after that when smarty re-compile the templates.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

jkounis

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.20
  • MySQL version: 5.1
  • PHP version: 5.3
Re: templates_c directory growing
May 01, 2011, 12:25:57 pm
Thank you. I guess I'll delete the files to speed up the backups.

I am wondering if others have encountered this problem. Is 20,000 files and 200MB normal for 1 month of usage?
Does this directory ever get automatically cleaned? Extrapolating out, I would have 500,000 files and about 5 GB in a couple of years if I didn't do anything.

I guess I'll add something like the following to my crontab. This should delete everything older than 30 days:

Code: [Select]
find <drupal root>/sites/default/fies/civicrm/templates_c -type f -mtime +30 -exec rm {} \;

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: templates_c directory growing
May 01, 2011, 01:35:36 pm

i checked on civicrm.org and it takes 26M. i dont think this should be growing a lot (we also clear this directory out during upgrades)

also on civicrm.org, we have 341 files and 1550 files and directories in templates_c. not sure why you have an ever expanding templates_c

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • templates_c directory growing

This forum was archived on 2017-11-26.