• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

server crashing and slowness

N

noworyz

Guest
I just recently got a new server and have been setting it up. I just moved my websites to it this past weekend and now the server is not running too well.

1) System Resources never drop below 98% and seem to be at 100% a lot

2) Apache crashes at least 4 times a day

3) my websites are loading really slow


I did just do the latest patch install for plesk 8.1.1.

Does anyone know of anything that might be causing all these issues and the slowness of my website?

Thanks, Chris
 
It's really hard to diagnose a problem with only symptoms. You need to understand the underlying cause.


You should


A: run top -c and then push PP. You'll see the name of the running process.

B: Your distribution of linux changes things. You should post this if you're asking questions.


C: use ps aux. It gives you a nice quick answer to what's hogging your resources and what needs to be killed or looked at.


D: install mod security and learn about configuring it to block attacks. PS: just installing it does nothing.

E: free -m. Maybe you're using swap

F: run show processlist; in mysql. Mysql can get out of hand.

G: df -h. See if your /tmp is full.

H: learn administration. Plesk is a nice interface for your customers. It does nothing but hinder you as an administrator.

J: answer questions and come off as completely arrogant. This increases your e-p-due.
 
there can be a million reasons.. start from checking CPU load, memory/swap usage and disk I/O operations speed using, for example, `top` and `vmstat` utilities..
 
ok, I will try those things that you both mentioned. This is my first time having my own server and have never administered a linux box. I have been hosted on one for a long time but never had to do anything to it.

Thanks
 
Here is the info from the commands you guys listed. My biggest site is a heavy mysql site based on a fairly large phpbb forum.


Plesk version: psa v8.1.1_build81070423.15 os_FedoraCore 6
Operating system: Linux 2.6.9-023stab043.1-smp

top -c
top - 09:30:56 up 3 days, 14:04, 1 user, load average: 0.12, 0.28, 0.25
Tasks: 67 total, 2 running, 65 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.9% us, 5.8% sy, 0.0% ni, 91.3% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 1048576k total, 311388k used, 737188k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24385 mysql 25 0 230m 37m 5516 R 32 3.7 0:00.97 /usr/libexec/mysqld
23955 apache 16 0 328m 22m 3608 S 1 2.2 0:01.70 /usr/sbin/httpd
22238 apache 15 0 332m 27m 3728 S 0 2.7 0:04.64 /usr/sbin/httpd
23879 root 16 0 12500 1188 904 R 0 0.1 0:00.36 top -c
23948 apache 15 0 329m 23m 3572 S 0 2.3 0:01.64 /usr/sbin/httpd
24234 apache 15 0 328m 22m 3588 S 0 2.2 0:00.57 /usr/sbin/httpd
1 root 16 0 10228 712 596 S 0 0.1 0:00.49 init [3]
30658 root 15 0 5796 600 484 S 0 0.1 0:03.45 syslogd -m 0
30711 root 16 0 44216 1068 628 S 0 0.1 0:05.30 /usr/sbin/sshd
31746 root 15 0 21508 912 704 S 0 0.1 0:00.33 xinetd -stayalive -
32069 root 16 0 97300 40m 2260 S 0 3.9 0:03.38 /usr/bin/spamd --us
32070 popuser 16 0 97300 38m 900 S 0 3.8 0:00.34 spamd child
32112 root 16 0 112m 6076 3440 S 0 0.6 0:00.08 /usr/local/psa/admi
32116 psaadm 16 0 130m 38m 21m S 0 3.8 1:38.52 /usr/local/psa/admi
32139 psaadm 16 0 135m 45m 23m S 0 4.4 1:43.76 /usr/local/psa/admi
32166 root 15 0 19636 1124 556 S 0 0.1 0:00.53 crond
32177 root 18 0 39928 780 420 S 0 0.1 0:00.00 /usr/sbin/saslauthd


ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 10228 712 ? Ss Apr28 0:00 init [3]
root 30658 0.0 0.0 5796 600 ? Ss Apr28 0:03 syslogd -m 0
root 30711 0.0 0.1 44216 1068 ? Ss Apr28 0:05 /usr/sbin/sshd
root 31746 0.0 0.0 21508 912 ? Ss Apr28 0:00 xinetd -stayali
root 32069 0.0 3.9 97300 41180 ? Ss Apr28 0:03 /usr/bin/spamd
popuser 32070 0.0 3.7 97300 39820 ? S Apr28 0:00 spamd child
root 32112 0.0 0.5 114768 6076 ? Ss Apr28 0:00 /usr/local/psa/
psaadm 32116 0.0 3.7 133192 39408 ? S Apr28 1:38 /usr/local/psa/
psaadm 32139 0.0 4.4 138460 46636 ? S Apr28 1:43 /usr/local/psa/
root 32166 0.0 0.1 19636 1124 ? Ss Apr28 0:00 crond
root 32177 0.0 0.0 39928 780 ? Ss Apr28 0:00 /usr/sbin/sasla
root 32178 0.0 0.0 39928 520 ? S Apr28 0:00 /usr/sbin/sasla
mailman 32203 0.0 0.7 87684 7904 ? Ss Apr28 0:00 /usr/bin/python
mailman 32211 0.0 0.9 89832 10256 ? S Apr28 0:04 /usr/bin/python
mailman 32212 0.0 0.9 89908 10292 ? S Apr28 0:04 /usr/bin/python
mailman 32214 0.0 0.9 89928 10268 ? S Apr28 0:04 /usr/bin/python
mailman 32215 0.0 0.9 89852 10256 ? S Apr28 0:04 /usr/bin/python
mailman 32216 0.0 0.9 89940 10296 ? S Apr28 0:04 /usr/bin/python
mailman 32217 0.0 0.9 89900 10368 ? S Apr28 0:04 /usr/bin/python
mailman 32218 0.0 0.9 89804 10256 ? S Apr28 0:03 /usr/bin/python
mailman 32219 0.0 0.9 89804 10252 ? S Apr28 0:00 /usr/bin/python
psaadm 32523 0.0 3.5 132940 37592 ? S Apr28 2:26 /usr/local/psa/
drweb 1809 0.0 1.2 17676 12820 ? Ss Apr28 0:02 /opt/drweb/drwe
root 2044 0.0 0.7 57400 8304 ? Ss Apr28 0:02 /usr/local/psa/
root 3075 0.0 0.2 122044 2852 ? Ssl Apr28 0:34 /usr/local/psa/
named 5569 0.0 0.4 164296 4500 ? Ssl Apr30 0:02 /usr/sbin/named
root 5764 0.0 0.0 34152 880 ? S Apr30 0:00 /usr/lib/courie
root 5766 0.0 0.1 26844 1292 ? S Apr30 0:00 /usr/sbin/couri
root 5775 0.0 0.0 34152 880 ? S Apr30 0:00 /usr/lib/courie
root 5777 0.0 0.1 26844 1292 ? S Apr30 0:00 /usr/sbin/couri
root 5783 0.0 0.0 34152 880 ? S Apr30 0:01 /usr/lib/courie
root 5785 0.0 0.1 26840 1288 ? S Apr30 0:00 /usr/sbin/couri
root 5792 0.0 0.0 34152 880 ? S Apr30 0:00 /usr/lib/courie
root 5794 0.0 0.1 26840 1288 ? S Apr30 0:00 /usr/sbin/couri
qmails 1401 0.0 0.0 3732 520 ? S May01 0:00 qmail-send
qmaill 1403 0.0 0.0 3676 508 ? S May01 0:00 splogger qmail
root 1404 0.0 0.0 3716 428 ? S May01 0:00 qmail-lspawn ./
qmailr 1405 0.0 0.0 3716 444 ? S May01 0:00 qmail-rspawn
qmailq 1406 0.0 0.0 3672 396 ? S May01 0:00 qmail-clean
root 1567 0.0 2.0 329420 21088 ? Ss May01 0:01 /usr/sbin/httpd
apache 1571 0.0 0.6 232300 7312 ? S May01 0:00 /usr/sbin/httpd
root 1662 0.0 0.1 10636 1228 ? S May01 0:00 /bin/sh /usr/bi
mysql 1698 3.8 3.6 236408 38700 ? Sl May01 22:45 /usr/libexec/my
apache 22238 1.3 2.6 340844 27812 ? S 09:25 0:05 /usr/sbin/httpd
root 22385 0.0 0.3 80268 3744 ? Ss 09:25 0:00 sshd: root@pts/
root 22464 0.0 0.1 10788 1540 pts/0 Ss 09:26 0:00 -bash
apache 23948 0.8 2.2 336964 23800 ? S 09:28 0:02 /usr/sbin/httpd
apache 23954 0.8 2.2 336296 23260 ? S 09:28 0:02 /usr/sbin/httpd
apache 23955 1.0 2.2 336480 23364 ? S 09:28 0:02 /usr/sbin/httpd
apache 24234 1.0 2.2 336544 23336 ? S 09:30 0:01 /usr/sbin/httpd
root 25622 0.0 0.0 10348 868 pts/0 R+ 09:32 0:00 ps aux



free -m
total used free shared buffers cached
Mem: 1024 304 719 0 0 0
-/+ buffers/cache: 304 719
Swap: 0 0 0



df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vzfs 25G 2.1G 23G 9% /


vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 738276 0 0 0 0 0 0 0 10 2 1 97 0 0



Is there anything else that might help see why server is having issue and why it says 100% in system resource use.
 
one other thing, I notice in Vistuozo > Resources that there is a VPS template that states

Configuration file for allocating 512 Mb of memory and 25G of HDD and auto-startup on HardwareNode Boot, and Debian/PLESK.

this doesn't seem right as on m,y desktop it says I have 1 GB ram and I am also using Fedora, not Debian. Would this affect anything?

I am probably using up all the stu[id questions this forum is allowed for one day but thanks for hanging in there with me.
 
more information...

I looked in the error log for httpd in var/log/httpd and it is FULL of this error like every 30 seconds.

[Wed May 02 09:45:50 2007] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/



My sites seem to be working, any idea what causes this?


Also, in the access log this seems to happen every 30 seconds or so too

127.0.0.1 - - [02/May/2007:10:00:14 -0600] "GET / HTTP/1.0" 403 3956 "-" "Apache/2.2.3 (Fedora) (internal dummy connection)"
 
I have attached a screen shot of what my system resources are doing. This seems a little crazy to be using this much resources.

Are there tweaks that need to be done to apache and/or mysql to help performace out. This is a brand new VPS and the hosting company that I got this through just started offering them so they are not too sure what is going on.

Your help in this matter is much appreciated.

Thanks
 
well, I don't see if the image actually got attached so I will post it.

system.png


my system resources go to 100% quite a bit.
 
anyone have any ideas on any of these issues/questions?

My apache server hasn't crashed for a couple of days now but system resoruces are still HIGH.

Sorry to come across pushy but these issues are kinda serious as my sites are being affected and members are complaining.
 
It could simply be that the VPS isn't set up optimally. There is undoubtedly a learning curve with the best way to set limits on the VPS.

The figures you have pasted, unless I have missed something, look perfectly normal, with very little system load.

In particular look at the top line in top: "0.12, 0.28, 0.25". The first figure is the 1minute load average. 0.12 is almost nothing (though of course it varies from server to server).

I know in Plesk you have that almost 100% system load figure. But I'm afraid I don't know how that figure is calculated so I don't know the importance or accuracy.

I'm inclined to think it is something to so with the setup of the system running your VPS, or the configuration of your VPS. I really really could be wrong here through. We are new at Virtuozzo too.

Faris.
 
Back
Top