Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jul 2006
Posts: 116
M
member
member
M Offline
Joined: Jul 2006
Posts: 116
Ever since upgrading from 7.2.x to 7.5.x, I'm having an awful time keeping my forums online.

My apache server keeps dying and I'm unsure why, especially since upgrading. There's nothing obvious in my error or access logs, although in the past there were issues with running out of semaphores, but this isn't always the case as far as I can tell.

So is anyone aware of any significant performance/resource usage differences between versions 7.2 and 7.5? I'm troubled as to why I'm experiencing this problem immediately after upgrading.

I've spent days trying to tune apache and the longest I've had it running continuously was 6 days, only to have it then go down for 7 hours frown

Any help would be greatly appreciated.

Last edited by Myke; 07/07/2009 12:43 AM.
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
We've now had a couple people who report some performance issues with this upgrade, while most have seen improvements. It sounds like you've been tuning apache so I'm assuming you have your own server. Have you been doing any MySQL tuning? I'd look at your MySQL config. If you're running the stock config then that's probably a big portion of the issue and I'd recommend downloading mysqltuner as a starter to see what you should probably change.

Joined: Jul 2006
Posts: 116
M
member
member
M Offline
Joined: Jul 2006
Posts: 116
Thanks for the reply, Rick.

I should have mentioned that I run on a VPS, so I'm able to tune both mysqld and httpd. So far, I've only been attempting to tune httpd because, well, that's what keeps dying due to my VPS hitting it's resource limits.

My VPS plan is on 384 MB RAM, so I guess I don't have acres of room to work with, but I figured it should be enough for what I'm hosting.

I ran mysqltuner.pl and received the following:

# ./mysqltuner.pl

>> MySQLTuner 1.0.0 - Major Hayden <major@mhtx.net>
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering
Please enter your MySQL administrative login: virtuafi_forums
Please enter your MySQL administrative password:

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[!!] Your MySQL version 4.1.22-standard is EOL software! Upgrade soon!
[OK] Operating on 32-bit architecture with less than 2GB RAM

-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 365M (Tables: 63)
[--] Data in HEAP tables: 2M (Tables: 2)
[!!] InnoDB is enabled but isn't being used
[!!] Total fragmented tables: 2

-------- Performance Metrics -------------------------------------------------
[--] Up for: 7h 3m 20s (151K q [5.970 qps], 14K conn, TX: 423M, RX: 36M)
[--] Reads / Writes: 68% / 32%
[--] Total buffers: 98.0M global + 12.2M per thread (200 max threads)
[!!] Allocating > 2GB RAM on 32-bit systems can cause system instability
[!!] Maximum possible memory usage: 2.5G (248% of installed RAM)
[OK] Slow queries: 0% (3/151K)
[OK] Highest usage of available connections: 3% (7/200)
[!!] None of your MyISAM tables are indexed - add indexes immediately
[OK] Query cache efficiency: 66.6% (71K cached / 107K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 11K sorts)
[OK] Temporary tables created on disk: 0% (13 on disk / 7K total)
[OK] Thread cache hit rate: 99% (7 created / 14K connections)
[OK] Table cache hit rate: 88% (237 open / 268 opened)
[OK] Open file limit used: 7% (457/6K)
[OK] Table locks acquired immediately: 99% (72K immediate / 72K locks)

-------- Recommendations -----------------------------------------------------
General recommendations:
Add skip-innodb to MySQL configuration to disable InnoDB
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Enable the slow query log to troubleshoot bad queries
All tables have been optimised except for the two HEAP tables. The MySQL server had been restarted with the last 24 hrs due to a mandatory/scheduled server reboot by my provider. The only other recommendation is the 'skip-innodb' option, but I have no idea what this is for, nor of any benefits to be gained?

Right now on my system, running top and sorting by the RES column I get:

Code
top - 06:52:36 up  7:30,  1 user,  load average: 0.16, 0.47, 0.48
Tasks:  57 total,   2 running,  55 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0% us,  0.0% sy,  0.0% ni, 100.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:   1048576k total,   311264k used,   737312k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 7725 root      16   0 84056  69m  656 S  0.0  6.8   0:07.48 clamd
30613 mysql     15   0  175m  36m 3628 S  0.0  3.6   7:21.70 mysqld
26021 root      16   0 26756  23m 2080 S  0.0  2.3   0:02.03 spamd
 9977 root      16   0 26756  22m 1040 S  0.0  2.2   0:00.00 spamd
 8031 nobody    15   0 28228  19m 2844 S  0.0  1.9   1:28.50 httpd
 8028 nobody    16   0 27600  18m 2848 S  0.0  1.8   1:45.11 httpd
 8154 nobody    16   0 26028  17m 3408 S  0.0  1.7   1:30.74 httpd
 8034 nobody    15   0 25864  17m 3412 S  0.0  1.7   1:08.40 httpd
 9850 nobody    16   0 26176  17m 2836 S  0.0  1.7   1:03.42 httpd
 8072 nobody    15   0 26112  17m 2828 S  0.0  1.7   1:18.70 httpd
24265 nobody    15   0 26000  17m 2828 S  0.0  1.7   0:52.91 httpd
13923 nobody    16   0 25804  17m 2840 S  0.0  1.7   1:31.25 httpd
 8033 nobody    15   0 25900  17m 2828 S  0.0  1.7   1:34.18 httpd
 6107 nobody    15   0 22140  12m 2404 S  0.0  1.3   0:10.82 httpd
As you can, the big hitters are the httpd processes. I'm still new to the world of apache tuning, so I don't know if an average of 17m for each httpd process screams BLOATED to anyone or not.

For what it's worth, here are my key httpd.conf settings:

Timeout 40
KeepAlive On
MaxKeepAliveRequests 200
KeepAliveTimeout 5
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 90
MaxRequestsPerChild 1000
There isn't a whole lot of science behind these numbers. They're a result of my reading numerous guides and trial-and-error. I wish I knew what I should be aiming for, but I don't. If you need to know a bit more about my site and the (small) traffic I get, then let me know although I fear that I've overwhelmed this post with enough details already!

But getting back to MySQL, here are the mysqld settings from my.cnf:

[mysqld]
skip-locking
character-sets-dir=/usr/share/mysql/charsets/
query_cache_limit=3M
query_cache_size=48M
query_cache_type=1
max_user_connections=20
max_connections=200
interactive_timeout=60
wait_timeout=30
connect_timeout=10
thread_cache_size=384
thread_concurrency=2
key_buffer=24M
join_buffer=3M
max_allowed_packet=32M
table_cache=3096
record_buffer=3M
sort_buffer_size=3096K
read_buffer_size=3096K
max_connect_errors=10
read_rnd_buffer_size=3096K
myisam_sort_buffer_size=48M
socket=/var/lib/mysql/mysql.sock

I'm probably guessing all of this is above and beyond the regular call for assistance, but thought I'd throw it out there anyways and hope for some help!? smile

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Hmm, I think you're main bottleneck is just going to be the amount of memory you have to work with. Once your mysql server has been up for 24-48 hours then you'll be able to get some better suggestions from the tuner.

It looks like you're not running any other MySQL applications so skip-innodb will help free up some memory as MySQL allocates some memory for it even when it's not being used.

I don't think your httpd processes are really out line, maybe a bit on the higher side, but nothing absurd. Are you getting a definitive error when your httpd dies, or does it just die with no error in the logs at all?

Joined: Jul 2006
Posts: 116
M
member
member
M Offline
Joined: Jul 2006
Posts: 116
I must apologise Rick, but I think I was misled in thinking my recent httpd server issues were due to the forum upgrade. In fact, I think I've always had httpd server issues, but I masked the problem using monit in the past. Monit is basically a monitoring process that can be used to watch and restart stuff, which I use for http, mail, ftp, etc. It's so good that I've been running it for a year and pretty much forgot that I had a httpd problem to begin with (hence this thread!). I highly recommend it.

But it just so happened that when I updated to ubbt 5.3, monit stopped running altogether, and so whenever httpd died it was never being automatically restarted. So I took the opportunity to update monit to the latest release and now my forums are ticking over again.

I still have an problem with httpd getting killed on a daily basis, but thanks to monit, it's never down for more than 2 minutes.

One of these days I'll look into tuning apache for better stability. But at this point I'll bow out and trouble you no further with my problem. Cheers, and thanks again for the help!

Joined: Jul 2006
Posts: 116
M
member
member
M Offline
Joined: Jul 2006
Posts: 116
Originally Posted by Myke
But it just so happened that when I updated to ubbt 5.3
Typo, meant to be 7.5.3.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Thanks for the update Myke. Hope you get your apache issue figured out eventually.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
1 members (Gizmo), 343 guests, and 134 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)