Please advice on this hosting problem

I keep getting this message from hosting company (it is just minimal shared hosting package)

Please note that the domain is suspended due to high memory usage.The spike in resource here is related to RAM and CPU. This means the scripts you run or the number of users who used your site has increased the server load. If such a load spike happens in future, you site might get suspended. Because if allowed to run, you site might crash web server thus bringing down 100s of sites in the server.

You need not confuse this with space or bandwidth. For example, if you are publishing a result where 1000s of users hit at a time. The site might be just 10 mb. The bandwidth consumed also might be few gbs. But since lot of people hit at a time. The server will crash. The same way, what we are talking about us CPU and memory usage as such. Hope this clarifies your doubt.

Kindly check the below logs,

[Thu Sep 12 14:39:59 2013] [info] Executing "/home/testlic_html/index.php" as UID 2213, GID 2210
[Thu Sep 12 14:40:01 2013] [info] Executing "/home/testlic_html/index.php" as UID 2213, GID 2210
[Thu Sep 12 14:40:06 2013] [info] Executing "/home/testlic_html/index.php" as UID 2213, GID 2210
[Thu Sep 12 14:40:42 2013] [info] Executing "/home/testlic_html/index.php" as UID 2213, GID 2210
[Thu Sep 12 14:40:43 2013] [info] Executing "/home/testlic_html/index.php" as UID 2213, GID 2210

Open in new window

My notes,

1. Is it problem of my websites code gives this problem or any code optimization needed? I am having Joomla, wordpress, Codeigniter based websites written by good programmers.

2. I am not sure whether the hosting just blame me to go for another plan etc.,

Please advise.
LVL 36
Loganathan NatarajanLAMP DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
The message says you're using too much memory with that one page, "/home/testlic_html/index.php", nothing more.  You should check that one page to see why it would be using a lot memory.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Loganathan NatarajanLAMP DeveloperAuthor Commented:
Thanks expert, I will check the page.
Ray PaseurCommented:
Your scripts can use a lot of memory if they put data into arrays.  Or to allocate new data structures inside loop.  But think about this a little bit... If you're running multiple web sites built on Joomla, WP and CodeIgniter platforms, why not get your own hosting?  Shared hosting is not made for something like this.  Consider Rackspace or SliceHost.  For a few hundred dollars a month this problem can be made to go away and stay away.
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

Loganathan NatarajanLAMP DeveloperAuthor Commented:
Thanks Ray, your points are useful.  I am thinking to go semi-dedicated server for myself... I have 50+ sites...
Julian HansenCommented:
Not sure if the multiple websites comes into play here - your hosting company is not going to ride you for your sites collectively.

The report from the seems to be pointing to a specific page.

What you could do is add the following statements at regular intervals throughout your index.php file
file_put_contents('memory.log',  ("Line : " . __LINE__ . " - Usage memory_get_usage() . PHP_EOL), FILE_APPEND); ?>

Open in new window

The memory.log file will now contain a line number and memory usage value for various checkpoints in your code. This is quick and dirty way to see where the usage could be.
Loganathan NatarajanLAMP DeveloperAuthor Commented:
Thanks a lot @ julianH ... I will check this code tonight and update.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.