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 (Moderator: Dave Greenberg) »
  • civicrm_cache is 240,000 rows and 375MB
Pages: [1]

Author Topic: civicrm_cache is 240,000 rows and 375MB  (Read 776 times)

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
civicrm_cache is 240,000 rows and 375MB
May 29, 2012, 10:59:23 am
Hey guys,

I am doing some admin on a Joomla 3.4.8 site and looking at the database table sizes it seems that civicrm_cache is 240,000 rows and 375MB.

Pretty huge.  Before I truncate, I thought I'd wonder out loud why it got so huge and if there is some we should be doing that we aren't (either globally within civi, or on this site).

Michael
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

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: civicrm_cache is 240,000 rows and 375MB
May 29, 2012, 10:37:31 pm

can u get a breakdown on the count for various groupNames in the cache table.

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

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: civicrm_cache is 240,000 rows and 375MB
May 30, 2012, 11:20:54 am
Code: [Select]
mysql> SELECT group_name, count(*) FROM civicrm_cache GROUP BY 1;
+------------------------------+----------+
| group_name                   | count(*) |
+------------------------------+----------+
| CiviCRM Search PrevNextCache |     1157 |
| CiviCRM Session              |   123129 |
| contact fields               |       22 |
| contact groups               |        1 |
| navigation                   |        1 |
+------------------------------+----------+
5 rows in set (0.00 sec)

Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

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: civicrm_cache is 240,000 rows and 375MB
May 30, 2012, 11:52:33 am

Might want to delete all entries with 'CiviCRM Session' as groupName :)

In 4.1.3 there will be a cleanup scheduled job which is recommended to be run hourly that does this periodically. Guess our current method of probabilistically cleaning it up is not working too well on that site :(

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

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: civicrm_cache is 240,000 rows and 375MB
May 30, 2012, 12:51:52 pm
Hi,

Don't recall the details, but on debian/ubuntu PHP was configured so it didn't clean the sessions randomly, so you needed to explicitly clean old sessions if you had your own session manager.

Might be linked?

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

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: civicrm_cache is 240,000 rows and 375MB
May 30, 2012, 11:00:06 pm

nope

we split the sessions and store it in our cache table (to make sessions a small manageable size)

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 (Moderator: Dave Greenberg) »
  • civicrm_cache is 240,000 rows and 375MB

This forum was archived on 2017-11-26.