HELP! Server overloading

Posted in: HELP! Guides |

HELP! My server is having load problems!Ok first of all this guide is not going to be entirely comprehensive on everything you need to do towards optimizing a server and figuring what is causing the server to overload. All of the guides in my HELP! series are not meant to replace a professional only give you a general idea of what you can do. If after reading this do not think that there is nothing you can do, it may be you simply have to hire somebody to take a look at it. It is very hard to write every single thing that might be wrong and sometimes it just takes a lot of experience to see what is wrong. The first thing to do is determine what bottleneck is slowing your system down. There are many things that can be causing the load on a server run out of control but the main things are CPU limitations, memory (RAM), or I/O of your disks. Typically people will look at the “uptime” of their server to give a general idea of if it is a load problem causing issues with a server. In general a load of ~1 for each cpu is reasonable, if you have 2 cpus with hyperthreading linux will see them as 4 which means your load can be around 4 without any major problems. That being said it is very possible that your server handles even double what the uptime load shows without any problems. The load from uptime has a lot of factors that go into it and if you are interested in finding out more I would suggest looking on google. When writing this guide i am assuming that your server is optimized so if I say you are running low on RAM you probably need to optimize it some more or get RAM for it.

(more…)

HELP! DDOS attack

Posted in: HELP! Guides |

HELP! My server is under a DDOS attack!

Ok first just take a breath, you are getting nothing done by worrying. This guide is meant to try and help mitigate the effects of an attack that is in progresss. I have compiled a lot of the things that I do but it is very possible I have forgotten something. Please feel free to add suggestions at the bottom if you would do it a different way or if this works good for you. This guide is not meant to take the place of a professional looking at your server but it should give you a very good idea of what is going wrong and point you in the right direction to solving the problem. A lot of this requires you to have an idea of what is happening with your server on a normal basis so you can see what is abnormal with it. It would not be a bad idea to run a few of these tests to see what is normal under your normal busy periods.

First check the load of the server
—–command—–
uptime
—–command—–
(more…)

HELP! Server Crashing

Posted in: HELP! Guides |

HELP! My server is constantly crashing!

There are a lot of things that may cause a server to crash, this guide is going to primarily look at the hardware side of crashing. There are many things that might be causing the server to crash from a software standpoint such a process that runs out of control or uses too many resources. There are a few things that might be going wrong with a server. Normally the component that goes wrong is the hard drive, simply because it is use so much and is a moving part. The RAM on a server will occasionally go but this is more common when the server is moved around or the RAM moved because it has a chance of being statically shocked. On the less common side of things you could have the CPU, powersupply, ethernet card, or motherboard going out.

(more…)

Links

Posted in: HELP! Guides |

If you want your website here please email me!

Forums or knowledge databases:
cPanel Forums
WebHostingTalk
My CP Admin
HelpDesk Network
cPanel Planet

Control Panels
cPanel
Ensim
Plesk
Webmin

Datacenters
Ev1/Theplanet
Softlayer
Misc Links
Slashdot
Google
HostingCon

How-to: Determine if a server is hacked

Posted in: HELP! Guides |

How-to: Determine is a server is hacked

This guide is not meant to be all inclusive for figuring out if a server is hacked however it should give you a pretty good idea if a server is hacked the method used. This guide is going to focus on getting hacked via a php injection attack which is the most common today. There are certainly others but chances are if the server has been compromised by a script kiddie you will be able to find it via this guide. As long as the server has not been rooted it is generally possible to clean up and find all of the tools and scripts that were put on the server. Once a server has been rooted it is impossible to determine without a doubt that you have cleared everything out and what can or cannot be trusted. Once a server has been rooted for sure the server should be reformated/reimaged before it is put back into production. If you are ever unsure of where to go next or woud like to hire somebody to take care of this please take a look TotalServerSolutions which is a company that I run and work for is very familiar with handling these types of problems and preventing them from happening. . Of course if you have had the server hacked once you need to make sure and secure it so that it does not get hacked as soon as it is put online again. (more…)

rpmdb: fatal region error detected; run recovery

Posted in: HELP! Guides |

I cam across this error when running anything with rpm:

rpmdb: fatal region error detected; run recovery
error: db4 error(-30982) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index

It comes from a lock file and some old datbase files that have been left over. Just clear out the /var/lib/rpm directory, rebuild rpm and it should work fine.

#cd /var/lib/rpm
#rm -f /var/lib/rpm/__db*
#rpm –rebuilddb

Quick way to add SWAP

Posted in: HELP! Guides |

While it would be ideal if every server had plenty of RAM in the real world that does not happen. If for some reason you have a server with too little SWAP or you are hitting the max of the swap here is a quick hack which will create a 2Gb container file then use it for additional swap space on the server. To check the swap space used you can use “free -m”.

dd if=/dev/zero of=/usr/swap-file bs=1024 count=2048000
mkswap /usr/swap-file
swapon /usr/swap-file
swapon -s
Now add the following to the /etc/fstab and you are done.

/usr/swap-file swap swap defaults 0 0

eXTReMe Tracker