1

I have a opencart website and hosted that in SSD special hosting. Maximum allowed RAM usage is 5GB. I have nearly 25,000 visitors per day. When my RAM usage goes to 100%, the website loads at very slow speed. When i contacted the hosting team, they said there is some files which uses more RAM. Can you please tell me how to find that file.

Thanks in advance.

Green Computers
  • 723
  • 4
  • 14
  • 24

1 Answers1

0

To figure out which files use the most memory, you will need to use PHP memory profiling tools. You can find more info about them here: PHP memory profiling

General profiling tools might also be useful: Simplest way to profile a PHP script

Also, 5GB is a very small amount of memory for a server, especially if you have 25k+ visitors a day. I honestly doubt it's possible to optimize a PHP script so much, that it would run smoothly for 25k visitors on just 5GB of RAM. Just think about it this way - if you have a 1000 visitors at the same time (with 25k a day, your peak might even be higher) then each user will only have 5mb of memory, which is not enough to even start an Apache instance, so of course the server will slow down, until memory is freed up.

My first step in this situation would be to upgrade a server and only then bother with profiling.

Victor Marchuk
  • 13,045
  • 12
  • 43
  • 67