# Plancache filling up /var/lib/memsql and causing outage

**URL:** <https://www.singlestore.com/forum/t/plancache-filling-up-var-lib-memsql-and-causing-outage/4427>\
**Category:** Feedback\
**Created:** [April 21, 2022, 2:10pm UTC](https://www.singlestore.com/forum/t/plancache-filling-up-var-lib-memsql-and-causing-outage/4427 "2022-04-21T14:10:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasanth.ramu](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/v/22d042/32.png) [@vasanth.ramu](https://www.singlestore.com/forum/u/vasanth.ramu)\
**Post date:** [April 21, 2022, 2:11pm UTC](https://www.singlestore.com/forum/t/plancache-filling-up-var-lib-memsql-and-causing-outage/4427/1 "2022-04-21T14:11:00Z")

</div>

Hi,

In one of our Class 1 application, plancache filled up nearly 100GB within 15 minutes on MA and at the same time occupying full /var/lib/memsql which was sized at 128GB. This resulted in a highly critical cluster outage.

I spoke to our SingleStore TAM. We would need a feature where we limit the plancache based on space occupied than based on the days to retain. Right now, only option is disk\_plancache\_expiration\_minutes . We would need something like disk\_plancache\_retention\_max\_size.

I landed up in a bridge call on a weekend and a problem ticket has been assigned to me.

Thanks,  
Vasanth

---

<div class="post-metadata">

**Author:** ![hanson](https://www.singlestore.com/forum/user_avatar/www.singlestore.com/hanson/32/196_2.png) [@hanson](https://www.singlestore.com/forum/u/hanson)\
**Post date:** [December 7, 2022, 1:23am UTC](https://www.singlestore.com/forum/t/plancache-filling-up-var-lib-memsql-and-causing-outage/4427/2 "2022-12-07T01:23:53Z")

</div>

This is solved in 7.6 with

[![](https://forum-prod-assets20231213123829991800000001.s3.dualstack.us-east-1.amazonaws.com/original/2X/d/dd64d2543d58e9df1b33bb27290d53f367024248.png)7.6 Release Notes](https://docs.singlestore.com/db/v7.8/en/release-notes/singlestoredb-memsql/7-6-release-notes.html)

enable\_compiled\_images\_eviction

and `compiled_images_eviction_memory_limit_mb`

and existing LRU plan cache eviction.

---

<div class="post-metadata">

**Author:** ![vasanth.ramu](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/v/22d042/32.png) [@vasanth.ramu](https://www.singlestore.com/forum/u/vasanth.ramu)\
**Post date:** [December 9, 2022, 3:34pm UTC](https://www.singlestore.com/forum/t/plancache-filling-up-var-lib-memsql-and-causing-outage/4427/3 "2022-12-09T15:34:33Z")

</div>

Thanks a lot Hanson for this feature added. Is this only in memory or applies to disk also?

.

---

<div class="post-metadata">

**Author:** ![hanson](https://www.singlestore.com/forum/user_avatar/www.singlestore.com/hanson/32/196_2.png) [@hanson](https://www.singlestore.com/forum/u/hanson)\
**Post date:** [December 10, 2022, 1:39am UTC](https://www.singlestore.com/forum/t/plancache-filling-up-var-lib-memsql-and-causing-outage/4427/4 "2022-12-10T01:39:48Z")

</div>

This is for in-memory only. On-disk plan expiration logic is described here:

> **[Managing Plancache Memory and Disk Usage · SingleStore Documentation](https://docs.singlestore.com/db/v8.0/user-and-cluster-administration/maintain-your-cluster/managing-memory/managing-plancache-memory-and-disk-usage/)**
>
> SingleStore is a modern relational database for cloud and on-premises that delivers immediate insights for modern applications and analytical systems. Book a demo or trial today!
