Site being very slow, too many queries, High load times!

faeronsayn

Well-known member
Page Time: 6.4313s

Memory: 14.3228 MB (Peak: 17.4902 MB)

Queries (32, time: 3.2619s, 50.7%)




Those are the load times I am getting when I go into debug.

I am pretty sure that these are high, even for my site. I only get about 100 people on simultaneously, no more than that. I do have a several addons installed, but I am not so sure if that is the problem or not. If anyone can help optimize this or at least let me know where I could go about optimizing it, would be really appreciated. Thank you :)

Edit: More infromation

At the time of this screenshot I have the following members online: Online now: 157 (members: 30, guests: 127)

Caasdfasdfasdfpture.PNG


Processes Running


Code:
  PID TTY          TIME CMD
    1 ?        00:00:00 init
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 migration/0
    4 ?        00:00:00 ksoftirqd/0
    5 ?        00:00:00 migration/0
    6 ?        00:00:00 watchdog/0
    7 ?        00:00:00 migration/1
    8 ?        00:00:00 migration/1
    9 ?        00:00:00 ksoftirqd/1
  10 ?        00:00:00 watchdog/1
  11 ?        00:00:00 migration/2
  12 ?        00:00:00 migration/2
  13 ?        00:00:00 ksoftirqd/2
  14 ?        00:00:00 watchdog/2
  15 ?        00:00:00 migration/3
  16 ?        00:00:00 migration/3
  17 ?        00:00:00 ksoftirqd/3
  18 ?        00:00:00 watchdog/3
  19 ?        00:00:00 events/0
  20 ?        00:00:00 events/1
  21 ?        00:00:00 events/2
  22 ?        00:00:00 events/3
  23 ?        00:00:00 cpuset
  24 ?        00:00:00 khelper
  25 ?        00:00:00 netns
  26 ?        00:00:00 async/mgr
  27 ?        00:00:00 pm
  28 ?        00:00:00 xenwatch
  29 ?        00:00:00 xenbus
  30 ?        00:00:00 sync_supers
  31 ?        00:00:00 bdi-default
  32 ?        00:00:00 kintegrityd/0
  33 ?        00:00:00 kintegrityd/1
  34 ?        00:00:00 kintegrityd/2
  35 ?        00:00:00 kintegrityd/3
  36 ?        00:00:00 kblockd/0
  37 ?        00:00:00 kblockd/1
  38 ?        00:00:00 kblockd/2
  39 ?        00:00:00 kblockd/3
  40 ?        00:00:00 ata/0
  41 ?        00:00:00 ata/1
  42 ?        00:00:00 ata/2
  43 ?        00:00:00 ata/3
  44 ?        00:00:00 ata_aux
  45 ?        00:00:00 ksuspend_usbd
  46 ?        00:00:00 khubd
  47 ?        00:00:00 kseriod
  48 ?        00:00:00 md/0
  49 ?        00:00:00 md/1
  50 ?        00:00:00 md/2
  51 ?        00:00:00 md/3
  52 ?        00:00:00 md_misc/0
  53 ?        00:00:00 md_misc/1
  54 ?        00:00:00 md_misc/2
  55 ?        00:00:00 md_misc/3
  56 ?        00:00:00 khungtaskd
  57 ?        00:00:01 kswapd0
  58 ?        00:00:00 ksmd
  59 ?        00:00:00 aio/0
  60 ?        00:00:00 aio/1
  61 ?        00:00:00 aio/2
  62 ?        00:00:00 aio/3
  63 ?        00:00:00 crypto/0
  64 ?        00:00:00 crypto/1
  65 ?        00:00:00 crypto/2
  66 ?        00:00:00 crypto/3
  71 ?        00:00:00 kthrotld/0
  72 ?        00:00:00 kthrotld/1
  73 ?        00:00:00 kthrotld/2
  74 ?        00:00:00 kthrotld/3
  76 ?        00:00:00 khvcd
  77 ?        00:00:00 kpsmoused
  78 ?        00:00:00 usbhid_resumer
  219 ?        00:00:03 kjournald
  285 ?        00:00:00 udevd
  518 ?        00:00:00 kstriped
  610 ?        00:00:07 flush-202:1
  629 ?        00:00:00 kauditd
  836 ?        00:00:00 auditd
  852 ?        00:00:01 rsyslogd
  904 ?        00:00:00 sw-cp-serverd
  914 ?        00:00:00 sshd
  922 ?        00:00:00 xinetd
  935 ?        00:00:00 couriertcpd
  937 ?        00:00:00 courierlogger
  945 ?        00:00:00 couriertcpd
  947 ?        00:00:00 courierlogger
  953 ?        00:00:00 couriertcpd
  955 ?        00:00:00 courierlogger
  962 ?        00:00:00 couriertcpd
  964 ?        00:00:00 courierlogger
1044 ?        00:00:00 master
1055 ?        00:00:00 qmgr
1059 ?        00:00:00 psa-pc-remote
1076 ?        00:00:00 tlsmgr
1130 ?        00:00:01 named
1171 ?        00:00:00 mysqld_safe
1263 ?        00:09:21 mysqld
1524 ?        00:01:00 drwebd.real
1534 ?        00:00:00 crond
1549 tty1    00:00:00 mingetty
1551 tty2    00:00:00 mingetty
1553 tty3    00:00:00 mingetty
1555 tty4    00:00:00 mingetty
1557 tty5    00:00:00 mingetty
1559 tty6    00:00:00 mingetty
1562 ?        00:00:00 udevd
1563 ?        00:00:00 udevd
1564 hvc0    00:00:00 agetty
4715 ?        00:00:01 httpd
4717 ?        00:00:00 httpd
5054 ?        00:00:00 sshd
5071 ?        00:00:00 sftp-server
19118 ?        00:00:00 pickup
23333 ?        00:02:53 httpd
25819 ?        00:02:07 httpd
26920 ?        00:01:55 httpd
26929 ?        00:01:45 httpd
27852 ?        00:01:27 httpd
28047 ?        00:01:27 httpd
28543 ?        00:01:28 httpd
29413 ?        00:00:46 httpd
29456 ?        00:01:03 httpd
29463 ?        00:01:13 httpd
29838 ?        00:00:53 httpd
30270 ?        00:00:47 httpd
30289 ?        00:00:44 httpd
30310 ?        00:00:51 httpd
30420 ?        00:00:46 httpd
30591 ?        00:00:48 httpd
30939 ?        00:00:31 httpd
31003 ?        00:00:00 sshd
31028 pts/0    00:00:00 bash
31054 pts/0    00:00:00 top
31305 ?        00:00:28 httpd
31519 ?        00:00:00 drwebd.real
31520 ?        00:00:00 drwebd.real
31521 ?        00:00:00 drwebd.real
31523 ?        00:00:00 drwebd.real
31673 ?        00:00:16 httpd
31674 ?        00:00:22 httpd
32050 ?        00:00:10 httpd
32498 pts/0    00:00:00 ps
 
I've had another look, and got the load back down to ~2 by installing nginx via plesk. Going through the access logs, there have been almost 5,000 unique IP addresses logged in the last 10 hours!

Code:
[root@server1 ~]# less /var/www/vhosts/XXXXXXX/statistics/logs/access_log | wc -l
541911

Code:
[root@server1 ~]# less ip_addy.txt | sort -n | uniq -c | sort -nr | wc -l
4838

Only issue with nginx is the .htaccess files no longer work, and I can't find anything about setting them up in plesk with the nginx rewrites.
 
I've had another look, and got the load back down to ~2 by installing nginx via plesk. Going through the access logs, there have been almost 5,000 unique IP addresses logged in the last 10 hours!

Code:
[root@server1 ~]# less /var/www/vhosts/XXXXXXX/statistics/logs/access_log | wc -l
541911

Code:
[root@server1 ~]# less ip_addy.txt | sort -n | uniq -c | sort -nr | wc -l
4838

Only issue with nginx is the .htaccess files no longer work, and I can't find anything about setting them up in plesk with the nginx rewrites.

Yes he's been helping me a lot with it.

But for some reason even before nginx was installed.

My site can't get accessed without www it displays an error.
 
Load is back under control. I've been able to update PHP and MySQL to the latest versions, and have got nginx with APC working

Code:
[root@server1 httpd]# uptime
 23:57:18 up 2 days,  1:23,  3 users,  load average: 1.36, 1.22, 1.20
 
Had to spend some more time trying to get to the bottom of this, and it looks like we've finally nailed it.

A mod installed doing Live Updates was hammering the server with requests for each logged in user every 10 seconds, regardless of their current activity.

Code:
[root@server1 ~]# zcat /var/www/vhosts/XXXXXXXXXXXX/statistics/logs/access_log.processed.1.gz | grep liveupdate | wc -l
531380
[root@server1 ~]#

That is in a 24 hour period! Mod has been removed, and load has come back down again, but some requests are still trying to do the live update post, so guessing they are cached in the users browser.

Code:
[root@server1 ~]# uptime
 11:18:11 up 1 day,  7:59,  2 users,  load average: 0.49, 0.91, 1.12

That's with 170 online at present.
 
Had to spend some more time trying to get to the bottom of this, and it looks like we've finally nailed it.

A mod installed doing Live Updates was hammering the server with requests for each logged in user every 10 seconds, regardless of their current activity.

Code:
[root@server1 ~]# zcat /var/www/vhosts/XXXXXXXXXXXX/statistics/logs/access_log.processed.1.gz | grep liveupdate | wc -l
531380
[root@server1 ~]#

That is in a 24 hour period! Mod has been removed, and load has come back down again, but some requests are still trying to do the live update post, so guessing they are cached in the users browser.

Code:
[root@server1 ~]# uptime
11:18:11 up 1 day,  7:59,  2 users,  load average: 0.49, 0.91, 1.12

That's with 170 online at present.

I can't thank MattW enough, he's spent so much time on my server. Thanks again man.
 
Back
Top Bottom