Raphael Schubert
Raphael Schubert

Reputation: 359

Make Symfony clear cache from times to times

i'm with an cool problem with symfony. Our client system is growing... fast... very fast... Suddenly i got an error, system goes down, and when i opened the CPANEL, i see this message.

Disk Quote Exceeded

Look at error:

Disk Quote Exceeded

BUT! we have all stats of server on 15% or low...

1.5GB from 15GB of disk space.
5gb montly transf. from 100gb
etc...etc..

I found this is because i have reached 100.000 files on FTP. barely all is from Symfony Cache.

How can i make symfony clear cache from times to times? To use most recently itens only... Not all itens as cached itens?

I found some help on documentation, but only usefull if i did created mannualy the cached itens.

Those 100.000 files was auto generated cache, from default configuration.

I dont know why this is happening, because i have another similar system, with 5x more users than this one and does not have reached this number yet...

Hope someone give an clue to solve this issue! Ty!

Upvotes: 2

Views: 581

Answers (1)

Michał G
Michał G

Reputation: 2302

the easiest solution it's to clear it in cron

5 */3 * * 1-5  /bin/php /path_to_app/app/console  cache:clear -e prod

But remember. cache is creating for a reason...

Upvotes: 1

Related Questions