Site crashing due to memory exceeded... HELP..

Hello All, Having some issues my site keeps going down. Hostgator is stating that my cache is filling up and using all the memory and crashing the server… What do I do… CS-Cart 2.1.4 Hostgator VPS L3… Thanks ahead for the help…

Jay



Do I need to delete all the cached files daily… If so what is the proper way…?

1st, open your config.local.php and change the cache method to “sqlite”



2nd, “Clear Your Cache” to clean up all the old files stored in your cache from the old “Files” cache method



3rd, If you are running smartoptimizer, then also delete only the contents of your /smartoptimizer/cache folder (don’t delete the smartoptimizer cache folder, only the files it contains).



The purpose here is to not only switch to the sqlite cache method, but also to clean house of all the old cached files to get off on the right foot.



ALSO, considering your hosting environment (same as mine), put the effort into making sure all your permissions for newly created files/directories are set properly also within your config.local.php as follows:



// Default permissions for newly created files and directories

define(‘DEFAULT_FILE_PERMISSIONS’, 0644);

define(‘DEFAULT_DIR_PERMISSIONS’, 0755);



Lastly, verify that all of your existing CS-Cart fles/folder permissions are correctly set as shown above. (This will save you much grief today and in the future!)



After this is done, enjoy & have a nice day… :cool:

Thank you STRUCK… I’ve made all the changes you have suggested… Is there any basic maintainance I need to do for this caching method…??



I’ve also upgraded my hosting package to the following…



CPU

1.98 GHZ



RAM

1344 MB



Disk Space

59 GB



Bandwidth

1050 GB



Hopefully this will help also with site speed…

Jay,


[QUOTE]Is there any basic maintainance I need to do for this caching method…??[/QUOTE]



Seldom would any maintenance be needing using the sqlite method, that is where the beauty lies…



Only problem is, you never mentioned how your site is running now! :wink:



OK, Looks like you have a bit of turbulance occuring in your cache folder!



So, Access your site via FTP, then manually delete the folder & entire contents of your /cache/ folder and also your /compiled folders. (They will immediately rebuild properly as soon as your site is visited, frontend as well as the admin side)



You should be fine afterwards.

Ok… Deleted both the cache and compiled folders and let them rebuild… Also deleted all the smartoptimizer cache folder contents… Hopefully that has fixed everything… Site seems to be loading find now… I’ll let it run for a few hours and hopefully its all good…



Thanks for all your help…

Good to hear Jay,



Give your entire site time to completely rebuild it’s cache as this will take some time as various areas of your site have been visited, and to see the full results of your changes. :wink:



See how it is doing in a day or two.

So what are you calling yourself today Struck? :wink:

So what are you calling yourself today Struck? :wink:



Considering the day I have had so far, my main objective is to finish putting out the office fires, then firing up the mega blender and starting my journey to Margaritaville! So, today I am a self proclaimed looser & am absolutely fine with that! :cool:

Ok… Having another issue… The sqlite caching is working but my /public_html/var/cache folder keeps getting deleted… Not sure how… When it gets deleted it takes down the site… When I recreate the folder and set permissions to 777 it gets deleted again… A few hours later…

Any Ideas…



Thanks

Jay

[B][/B]Ok, let’s try this again… :smiley:


[QUOTE]put the effort into making sure all your permissions for newly created files/directories are set properly also within your config.local.php as follows:



// Default permissions for newly created files and directories

define(‘DEFAULT_FILE_PERMISSIONS’, 0644);

define(‘DEFAULT_DIR_PERMISSIONS’, 0755);



Lastly, verify that all of your existing CS-Cart fles/folder permissions are correctly set as shown above. (This will save you much grief today and in the future!)[/QUOTE]



Hint = In what part of folder/directory permissions did I mention 777 ?

[quote name=‘Struck’][B][/B]Ok, let’s try this again… :smiley:







Hint = In what part of folder/directory permissions did I mention 777 ?[/QUOTE]



oh, My bad… I’m on it…

the folder will be deleted anytime a cc parameter comes from the URL or an internal function (like updating block contents, changing addon settings, etc.) thinks it needs to clear the cache. It should rebuild itself upon the next access.