LAMP / Wordpress sporadic hangs...

Hi -

I just migrated a couple of sites to a Linode 768 running Ubuntu LAMP. One site is Wordpress. The WP site gets 10K pageviews per week.

I turned on wpsupercache but I still I get sporadic hangs on the WP site well as long waits/resets trying to connect to Webmin. The IO and CPU graphs look wacky.

~~![](<URL url=)http://kleptonomicon.com/images/graphs.jpg" />

ps auxc

root 957 0.0 0.0 0 0 ? S 2010 0:00 kstriped

root 959 0.0 0.0 0 0 ? S 2010 0:00 ksnapd

root 974 0.0 0.0 0 0 ? S 2010 0:59 kjournald

root 1002 0.0 0.0 2404 664 ? S 2010 0:02 upstart-udev-br

root 1469 0.0 1.0 34720 8004 ? Ss 05:37 0:00 apache2

postfix 1911 0.0 0.2 5828 1704 ? S 06:08 0:00 pickup

www-data 1969 2.5 3.5 54396 27108 ? S 06:09 0:21 apache2

root 2033 0.0 0.0 2376 676 ? Ss 2010 0:07 cron

root 2053 0.0 0.0 0 0 ? S 2010 0:37 flush-202:0

www-data 2088 6.5 3.4 53768 26768 ? S 06:20 0:11 apache2

www-data 2089 3.3 3.2 52240 25140 ? S 06:20 0:06 apache2

www-data 2096 1.4 2.8 48840 21820 ? S 06:20 0:02 apache2

root 2099 0.0 0.0 2232 356 ? Ss 2010 0:00 dhclient3

www-data 2101 4.3 2.8 48740 21712 ? S 06:20 0:07 apache2

www-data 2102 2.9 2.7 47960 20904 ? S 06:20 0:05 apache2

www-data 2133 3.5 3.2 52724 25380 ? S 06:21 0:04 apache2

www-data 2138 3.0 2.8 49084 21800 ? S 06:22 0:02 apache2

www-data 2145 2.4 2.7 48060 20852 ? S 06:22 0:01 apache2

www-data 2146 1.9 2.7 48380 21364 ? R 06:22 0:01 apache2

root 2149 0.0 0.0 4036 444 ? Ss 2010 0:06 vsftpd

www-data 2150 2.4 2.6 47276 20216 ? S 06:22 0:01 apache2

rob 2154 0.0 0.1 2432 964 pts/1 R+ 06:23 0:00 ps

rob 2155 0.0 0.0 2024 680 pts/1 S+ 06:23 0:00 more

ntp 2256 0.0 0.1 4408 840 ? Ss 2010 0:01 ntpd

root 2263 0.0 0.1 5812 824 ? Ss 2010 0:36 master

postfix 2284 0.0 0.1 5964 1008 ? S 2010 0:07 qmgr

root 2374 0.0 0.0 1788 412 hvc0 Ss+ 2010 0:00 getty

root 22998 0.0 0.3 13908 2944 ? Ss Jan03 4:29 miniserv.pl

mysql 26570 2.2 9.0 385964 69820 ? Ssl Jan28 227:38 mysqld

daemon 28025 0.0 0.0 2248 292 ? Ss Jan28 0:00 atd

root 29242 0.0 0.1 5548 1388 ? Ss Jan28 0:03 sshd

root 29470 0.0 0.1 8352 1432 ? Ss 01:09 0:00 sshd

rob 29482 0.0 0.1 8512 924 ? S 01:09 0:01 sshd

rob 29483 0.0 0.1 3096 788 pts/2 Ss 01:09 0:00 bash

rob 29494 0.2 0.1 2548 1012 pts/2 S+ 01:09 0:42 top

syslog 29596 0.0 0.1 21096 1172 ? Sl Jan28 0:06 rsyslogd

root 29738 0.0 0.0 2184 464 ? S ~~root 29756 0.0 0.0 2180 432 ? S< Jan28 0:00 udevd

root 32521 0.0 0.2 8552 1728 ? Ss 04:11 0:00 sshd

rob 32535 0.0 0.1 8552 996 ? S 04:11 0:00 sshd

rob 32536 0.0 0.1 3104 1404 pts/1 Ss 04:11 0:00 bash


free -m

total used free shared buffers cached

Mem: 751 565 185 0 23 259

-/+ buffers/cache: 283 467

Swap: 255 49 206


/server-status

Apache Server Status for cantstopthebleeding.com

Server Version: Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.7 with Suhosin-Patch mod_ssl/2.2.14 OpenSSL/0.9.8k

Server Built: Nov 18 2010 21:17:19

Current Time: Friday, 04-Feb-2011 06:00:30 UTC

Restart Time: Friday, 04-Feb-2011 05:37:23 UTC

Parent Server Generation: 0

Server uptime: 23 minutes 6 seconds

11 requests currently being processed, 4 idle workers

KWKKKK.KCC……K..K………………………………….

……………………………………………………….

……………………………………………………….

……………………………………………………….

PID Key:

1780 in state: _ , 1749 in state: K , 1781 in state: W

1611 in state: K , 1782 in state: _ , 1762 in state: K

1738 in state: K , 1512 in state: _ , 1763 in state: K

1752 in state: _ , 1765 in state: K , 1753 in state: C

1766 in state: C , 1759 in state: K , 1713 in state: K

To obtain a full report with current status information you need to use the ExtendedStatus On directive.

SSL/TLS Session Cache Status:

cache type: SHMCB, shared memory: 512000 bytes, current sessions: 0

subcaches: 32, indexes per subcache: 133

index usage: 0%, cache usage: 0%

total sessions stored since starting: 0

total sessions expired since starting: 0

total (pre-expiry) sessions scrolled out of the cache: 0

total retrieves since starting: 0 hit, 0 miss

total removes since starting: 0 hit, 0 miss

Thanks in advance for any help…

-r~~~~

5 Replies

Only 10,000 pageviews per week? You're averaging ~320 kb/sec out, which is twice what I'm averaging with 30,000 pageviews per day…

I would check your access logs and make sure you aren't getting more traffic than you realize. You might be bumping up against the MaxClients setting in Apache, perhaps due to some unusually popular static content (e.g. someone hot-linking to images, or something).

Also, considering so many different PIDs in server-status, you're running prefork… >.>

About prefork - what do you reccomend?

-r

Ok, so I panicked my Linode and I have no clue how. What's the best way to do a post-mortem?

The last thing I did was attempt to move to apache2-mpm-worker. I saw that was more involved than I realized, so installed prefork, and reinstalled the broken php5 and mysql extenstion it needed.

An hour and a half later, it panicked and died.

-r

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct