LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-31-2007, 09:28 PM   #1
taydu3000
LQ Newbie
 
Registered: Oct 2003
Posts: 28

Rep: Reputation: 15
connection time out


I ran vbulletin on a dedicated server that running centros with 1 gig ram, but for some reaseon when it reach about 350 user viewing the forum then the connection get time out. but im still can pinging it with really good response time avg. 50ms

what wrong ?
 
Old 07-31-2007, 09:50 PM   #2
loonix
Member
 
Registered: Aug 2003
Location: Sydney Australia
Distribution: CentOS/archlinux
Posts: 40

Rep: Reputation: 16
Hi,

This could be one of many things.
You haven't put much info in here to help.
Something I would check first is disk io.
If you have it all on the one server ( webserver, sql server etc etc )
then it is quite possible it is disk io.
You can check out the disk io, along with other things with the command iostat -x 1 ( the number is the refresh rate )
ice: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.03 8.41 0.52 10.12 23.37 141.13 11.68 70.57 15.46 0.03 2.69 3.17 3.38

the coloum %util tells you how busy the hard drive is. If this is constantly up around the 100% mark then that is the bottleneck.
iostat is part of the sysstat package on a fedora server.
If this is it then several things to possible do, make sure the sql server is tuned properly or move the sql server to a seperate disk array or seperate server.
Post a bit more info.
Server stats: raid 1/5 ?? drive speeds, etc etc
 
Old 11-01-2007, 02:18 AM   #3
taydu3000
LQ Newbie
 
Registered: Oct 2003
Posts: 28

Original Poster
Rep: Reputation: 15
hello thanks for you reply,

I looked at the iostat during peek time and the %util isn't not even 50%. So i look at apache states and figure out that when i get timeout is when the apache restart, but I don't know why it's restart it's possile to look at the log and figure out why apache restart?

how to do it ?

thanks
 
Old 11-02-2007, 02:15 AM   #4
taydu3000
LQ Newbie
 
Registered: Oct 2003
Posts: 28

Original Poster
Rep: Reputation: 15
according to apache error log these things happend when apache restart:
Code:
[Wed Oct 31 17:17:11 2007] [warn] VirtualHost SERVER.IP:80 overlaps with VirtualHost SERVER.IP:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Wed Oct 31 17:17:11 2007] [warn] VirtualHost SERVER.IP:80 overlaps with VirtualHost SERVER.IP:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Wed Oct 31 17:17:11 2007] [warn] VirtualHost SERVER.IP:80 overlaps with VirtualHost SERVER.IP:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Wed Oct 31 17:17:11 2007] [warn] VirtualHost SERVER.IP:80 overlaps with VirtualHost SERVER.IP:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Wed Oct 31 17:17:11 2007] [warn] VirtualHost SERVER.IP:80 overlaps with VirtualHost SERVER.IP:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Wed Oct 31 17:17:11 2007] [warn] NameVirtualHost SERVER.IP:80 has no VirtualHosts
[Wed Oct 31 17:17:11 2007] [warn] NameVirtualHost SERVER.IP:80 has no VirtualHosts
[Wed Oct 31 17:17:11 2007] [warn] NameVirtualHost SERVER.IP:80 has no VirtualHosts
[Wed Oct 31 17:17:11 2007] [warn] NameVirtualHost SERVER.IP:80 has no VirtualHosts
[Wed Oct 31 17:17:11 2007] [warn] NameVirtualHost SERVER.PRIVATE.IP:80 has no VirtualHosts
[Wed Oct 31 17:17:11 2007] [notice] Apache/1.3.39 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.7 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.30 OpenSSL/0.9.7a configured -- resuming normal operations
[Wed Oct 31 17:17:11 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[Wed Oct 31 17:17:11 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
What does it mean and how to fix it thanks
 
Old 11-02-2007, 03:20 AM   #5
complich8
Member
 
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 17
From those log messages, I'd say that something's amiss with your virtualhost declarations. You should consult the apache docs ( http://httpd.apache.org/docs/2.2/vhosts/name-based.html ) and straighten that out. But that's probably just a "correctness" issue, not the likely root cause of your timeouts and other problems.

You should check out "top" and "uptime" -- both of which will tell you your load average. Also, "free" is handy for system information gathering (eg: free -m), and vmstat to see what's going on in memory. iostat only gives you one piece of the picture.

If your vmstat output shows significant swapping in and out, you probably have a bit of a memory shortage going on, and should do something about that.

If your load is very high (say, >=5), and the highest-up processes in "top" are either php or httpd processes (depending on whether you're using php as a cgi or module), you should look into PHP Opcode Caching (hint: keywords ). You may also benefit from switching from php-cgi to fastcgi, performance-tuning and trimming down apache, etc. But seriously, appropriate opcode caching is just an insane improvement in responsiveness and load time, so if you're running any significant php you should definitely be running something for it.

If MySQL is high up in the list, you should verify that thread caching, query caching, and your buffer settings are sane. Relevant variables include query_cache_limit, query_cache_size, thread_cache_size, key_buffer, join_buffer_size, sort_buffer_size. See also http://dev.mysql.com/doc/refman/5.1/...variables.html, and the "show variables" and "show status" command from within mysql. You may also benefit from making sure that your queries are appropriately indexed, leveraging the slow query log as necessary.
 
Old 11-02-2007, 03:51 AM   #6
taydu3000
LQ Newbie
 
Registered: Oct 2003
Posts: 28

Original Poster
Rep: Reputation: 15
thank you for your reply. Before apache restore I did ran top and saw only 140mb of memory are free, couple minute later it it's restart.

So could it be memory problem.

On the old server I ran P4 single core 3.6Ghz with only 1 gig and it was able to handle 500 vbulletin users. Now on the new server I have Dual processor dual core 2.4Ghz with 4 gigs and it only handle about 800 users. I didn't expect the number to be quadrupal (2000) but isn't 800 too low for the new server specs ?
 
Old 11-02-2007, 09:55 AM   #7
complich8
Member
 
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 17
yeah, have you looked into that opcode caching thing I mentioned? And the mysql variables?

Seriously ... I have a celeron 2.4 with a gig of ram and it and it handles several hundred concurrent users on vbulletin, several dozen on a separate phpbb, loads of simultaneous downloads of video files, a fairly busy bittorrent tracker and a couple other things with no major issues. PHP Opcode caching and tuning those couple of mysql settings I mentioned dropped my system load on that machine from 35.0-70.0 to lower than 2.0.

As far as the free memory that top reports, pay little attention to it. Linux uses memory as an io cache and for various io-related buffers, and frees them on demand. If you look at "free -m" you'll see two lines: "Mem:" "-/+ buffers/cache:" and "swap". The second line's "free" column is how much memory is actually available (ie: allocated for buffers/cache, but can be dumped on demand).

The "load average" values are probably the single most telling indicator on a webserver. Load average of less than the number of cpu's means you're generally doing ok...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Telnet - connection time out abha_shrimal Linux - Networking 2 04-10-2006 08:10 AM
Time out in Connection established state if no Data flows on that connection asurya Linux - Networking 2 04-10-2005 03:54 PM
Time out in Connection established state asurya Linux - Newbie 1 04-10-2005 03:48 PM
PPTP connection lost after certain time bagira Linux - Networking 0 09-08-2004 09:37 AM
Connection Time Out moskal Linux - Newbie 9 07-29-2004 09:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration