• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

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.
Loganathan Natarajan
Loganathan Natarajan
3 Solutions
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.
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.
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now