If you are a Cloud Reseller, you have the tools at your disposal to investigate, troubleshoot, and test solutions for any Cloud issues that come your way. Cloud accounts are configured with a set number of resources, and it is not possible for a Cloud account to over-utilize such resources which may sometimes result in a crash of certain processes. Sometimes the Apache webserver crashes, and sometimes just the e-mail processes. Regardless of what is happening, here is some information you can use to try and resolve these issues.
Short for "Out of Memory." These crashes are a result of the virtual machine running into the RAM limits. Each Cloud account is also equipped with what is called a "swap" to help create a buffer zone with the limit of RAM on the account. Swap should only be in use if the RAM dedicated to a Cloud account has been reached. Sometimes even the swap becomes overloaded and runs out. When this happens, many processes are not able to reboot or recover, and simply stop functioning.
If your virtual machine runs out of memory and swap, services will cease to operate. Since Linux cannot always check to determine if a certain process will overload the server, this can happen frequently if several connections, applications, or scripts are all requested memory when there is no more to provision.
Whenever this happens, your Cloud may need a full reboot to recover. After that, you will want to figure out what caused the memory overload. You can check http://netstatus.westhost.com/ for any reported issues with the overall Cloud environment. If there is nothing there, the issue is usually specific to your own VPS or Cloud account.
If you have a CentOS/CloudLinux-based server, you can try to look for memory messages [oom-killer] in the /var/log/messages file. The oom-killer is a task that is designed to end processes running on the server to free up some additional memory as that free memory limit gets close to its end. If you have oom-killer entries in /var/log/messages, the issue is related to memory usage spikes that may be caused by a misconfigured process or script on your server.
Firstly, when noticing repeated Cloud issues that are not related to memory issues, you will want to consider upgrading Apache and PHP. The current versions are frequently "deprecated," and may sometimes also be an "end of life."
Deprecated means that the product is considered outdated, but there may be options like patches that provide compatibility or security for your version.
End of Life software means that the product has reached the end of its life and no security or compatability patches will become available anymore.
Please also refer to http://docs.cpanel.net/twiki/bin/view/EasyApache3/WebHome#EasyApacheSupportLevels
It is important to run tools like EasyApache during non-peak hours, or at night/on weekends since the rebuild can require a lot of resources to complete.
Apache forks a lot of child processes which may use up all the memory in your system. This includes overusing the swap allocation which may lead to CPU overload.
To solve this issue, you may need to optimize your Apache installation. This can include decreasing MaxClients and/or MaxRequestsPerChild. For more information, you will want to visit the Apache site.
If you only recently started having an issue with your Cloud/VPS then you will want to look at any recent updates or plugins you have applied to your site applications/scripts. Disable any plugins to try and resolve the issue.
You can add caching engine tools to your Cloud account which might improve performance. These include APC, eAccelerator, and so on. These can significantly minimize the overall server load and memory usage. Make sure to enable the ability to use a caching engine in your application.
For example, you need to tell WordPress that you are using a tool like the W3 Total Cache plugin and set the Opcode Cache to APC [if that's what you have installed]. The steps to install APC through WHM are:
WHM >> Module Installers >> PHP Pecl >> Manage >> Type APC into the search and click Go >> Install.
WestHost recommends only installing ONE caching plugin. If you do install APC, be sure to carefully configure the apcAPC.* options in php.ini as some of the defaults can be optimized.
Check and optimize MySQL performance. Make sure to enable caching. Also enable logging for slow queries and optimize the slow queries from the log entries you find.
If you are experiencing an issue with your Cloud account at the same time each day, hour, week, or so on you will want to check the cron tasks that are active for your account. Disable any that start before issues repeat, and follow up to determine if that resolves your issue.
Ensure that you do not have any unknown or strange-looking, processes running on your Cloud account. If there are, your server may have been compromised. You will need to investigate how to remove the malicious file while using your log files to determine how the compromise occurred in order to avoid future exploitation.
Investigate your mail queue and ensure that you do not have a high number of spam messages in there. If so, investigate the incident and secure your server properly to avoid continued issues. You might also implement an hourly Max Emails limit through WHM >> Tweak Settings to ensure that your finite resources are not being consumed by thousands of e-mails all being sent simultaneously and taking up all available memory or CPU.
Enable server density to monitor swap usage on your server. If swap is used very often, you may need to disable unnecessary services, optimize existing ones to use less, or add more nodes to your virtual server.
It is always vital to see what your logs have to say right before a crash occurs.
You may want to check your network connection number to see if the server is under a DoS attack or a SYN packet flood. If it is, try to tweak kernel parameters and tune your firewall settings.
You might want to install a server monitoring application such as Nagios to pull more detailed reporting of any issues. This will allow you to better track how you can keep your account online and increase overall uptime. You may also want to consider a remote monitoring service like Pingdom or Google Webmaster but do take notice that those are not going to be 100% accurate since they are remote applications.
If you have any questions on how to address the issues featured above, please contact support. When going through this list of suggestions, we recommend that you stagger each update or change by 24 hours to allow you time for monitoring performance issues both positive and negative. This will ensure that you stay on track with your account configurations and end up with a server that is more perfectly suited to your needs.
No worries, Our experts are here to help.