Reputation: 852
I have a huge site built with Symfony1.4, and it have about 600/700 apps.
With a cronjob it automatically create new apps when something happens, so, let's say that we create 5 new apps per day.
Now, my problem is that when the system create the app, after I launch the command for clear the cache and repair the permissions:
php symfony cc;
php symfony project:permissions
But, doing this, with 7 hundred apps, my server become extremly slowly, and sometimes become even unreachable.
How can I sole this?
Can anyone give us a suggestion?
Upvotes: 0
Views: 88
Reputation: 22756
Woow 600/700 apps :o
Anyway, I think you should better use a shell script to do this kind of actions (since you don't really need the symfony environment to execute these tasks).
Basically, symfony cc
remove what's inside cache folder, so, you can run rm -Rf cache/*
instead, it could be much faster.
For permissions part, you can run these commands:
# permission on global dirs
chmod 777 web/uploads
chmod 777 cache
chmod 777 log
chmod 777 symfony
# permissions on every thing inside cache, upload & log dir
find cache -type f -print | xargs chmod 666
find web/upload -type f -print | xargs chmod 666
find log -type f -print | xargs chmod 666
find cache -type d -print | xargs chmod 777
find web/upload -type d -print | xargs chmod 777
find log -type d -print | xargs chmod 777
Upvotes: 2