Spurious Apache server not connecting

Hi All

I hope you guys can help. This is driving me nuts

I ahve a wampserver with apache 2.2.24 php 5.3.13 mysql 5.5.24 ( which has been rebuilt a few times so its not the SW

The server is host on a local network to around 20 or so users. There is no rhyme or reason to it but all of a sudden the server will just not load the pages. This then effects all users. The only way I can get it back up and running again is restarting all services. Then it works again.

I ahve checked the error logs and there are no fatal errors in the apache log or the PHP log. The mysql log does not have anything listed.

I have reconfigured the network to all statics 192.168.10.1-40 and the BT router to 192.168.0.254. I thought it may be the connection speed of the network cards so I have made the server 100 base T full duplex and the router access the same.

Is there anywhere I can look for some answers as to why the server all of a sudden becomes unavailable?

Thanks in advance

Keith

You might find its something else like the network stack of hte Windows pc hosting it thats getting stuck - have a look at a ‘netstat’ next time it does it (Before restarting the services) and see if theres a lot of connections that are being held open?

The Router shouldn’t get too muc in the way if you are going local only - and if the internet still works during, I’d say its probably fine.

Thanks for getting back Tim

I will do a netstat -a next time it goes down. In teh mean time I ahve done a one now as follows

Active Connections

Proto Local Address Foreign Address State
TCP 0.0.0.0:21 SERVER:0 LISTENING
TCP 0.0.0.0:80 SERVER:0 LISTENING
TCP 0.0.0.0:135 SERVER:0 LISTENING
TCP 0.0.0.0:445 SERVER:0 LISTENING
TCP 0.0.0.0:554 SERVER:0 LISTENING
TCP 0.0.0.0:2869 SERVER:0 LISTENING
TCP 0.0.0.0:3306 SERVER:0 LISTENING
TCP 0.0.0.0:3389 SERVER:0 LISTENING
TCP 0.0.0.0:5357 SERVER:0 LISTENING
TCP 0.0.0.0:5800 SERVER:0 LISTENING
TCP 0.0.0.0:5900 SERVER:0 LISTENING
TCP 0.0.0.0:10243 SERVER:0 LISTENING
TCP 0.0.0.0:17500 SERVER:0 LISTENING
TCP 0.0.0.0:49152 SERVER:0 LISTENING
TCP 0.0.0.0:49153 SERVER:0 LISTENING
TCP 0.0.0.0:49154 SERVER:0 LISTENING
TCP 0.0.0.0:49155 SERVER:0 LISTENING
TCP 0.0.0.0:49156 SERVER:0 LISTENING
TCP 127.0.0.1:2559 SERVER:0 LISTENING
TCP 127.0.0.1:3306 SERVER:61983 ESTABLISHED
TCP 127.0.0.1:3306 SERVER:61984 ESTABLISHED
TCP 127.0.0.1:3306 SERVER:61985 ESTABLISHED
TCP 127.0.0.1:3306 SERVER:61986 ESTABLISHED
TCP 127.0.0.1:3306 SERVER:61989 ESTABLISHED
TCP 127.0.0.1:3306 SERVER:61991 ESTABLISHED
TCP 127.0.0.1:3306 SERVER:61994 ESTABLISHED
TCP 127.0.0.1:3306 SERVER:61995 ESTABLISHED
TCP 127.0.0.1:3306 SERVER:62025 ESTABLISHED
TCP 127.0.0.1:3306 SERVER:62090 ESTABLISHED
TCP 127.0.0.1:3306 SERVER:62302 ESTABLISHED
TCP 127.0.0.1:3306 SERVER:62303 ESTABLISHED
TCP 127.0.0.1:3306 SERVER:62304 ESTABLISHED
TCP 127.0.0.1:14147 SERVER:0 LISTENING
TCP 127.0.0.1:14147 SERVER:62605 ESTABLISHED
TCP 127.0.0.1:19872 SERVER:49162 ESTABLISHED
TCP 127.0.0.1:49162 SERVER:19872 ESTABLISHED
TCP 127.0.0.1:61983 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:61984 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:61985 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:61986 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:61989 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:61991 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:61994 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:61995 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:62025 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:62090 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:62302 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:62303 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:62304 SERVER:3306 ESTABLISHED
TCP 127.0.0.1:62605 SERVER:14147 ESTABLISHED
TCP 192.168.10.1:80 PC-7:4531 FIN_WAIT_1
TCP 192.168.10.1:80 LEWIS:4229 FIN_WAIT_1
TCP 192.168.10.1:80 192.168.10.18:1645 TIME_WAIT
TCP 192.168.10.1:80 192.168.10.18:1655 TIME_WAIT
TCP 192.168.10.1:80 192.168.10.18:1663 TIME_WAIT
TCP 192.168.10.1:80 192.168.10.18:1664 TIME_WAIT
TCP 192.168.10.1:80 192.168.10.23:1867 ESTABLISHED
TCP 192.168.10.1:80 192.168.10.23:1868 ESTABLISHED
TCP 192.168.10.1:139 SERVER:0 LISTENING
TCP 192.168.10.1:3389 host81-149-229-173:58454 ESTABLISHE
TCP 192.168.10.1:60605 v-client-1a:https CLOSE_WAIT
TCP 192.168.10.1:60606 v-client-1a:https CLOSE_WAIT
TCP 192.168.10.1:60932 sjc-not19:http ESTABLISHED
TCP 192.168.10.1:62761 v-client-5a:https CLOSE_WAIT
TCP 192.168.10.1:63207 89.187.107.41:http TIME_WAIT
TCP 192.168.10.1:63208 89.187.107.41:http TIME_WAIT
TCP 192.168.10.1:63209 89.187.107.41:http TIME_WAIT
TCP [::]:80 SERVER:0 LISTENING
TCP [::]:135 SERVER:0 LISTENING
TCP [::]:445 SERVER:0 LISTENING
TCP [::]:554 SERVER:0 LISTENING
TCP [::]:2869 SERVER:0 LISTENING
TCP [::]:3389 SERVER:0 LISTENING
TCP [::]:5357 SERVER:0 LISTENING
TCP [::]:10243 SERVER:0 LISTENING
TCP [::]:49152 SERVER:0 LISTENING
TCP [::]:49153 SERVER:0 LISTENING
TCP [::]:49154 SERVER:0 LISTENING
TCP [::]:49155 SERVER:0 LISTENING
TCP [::]:49156 SERVER:0 LISTENING
UDP 0.0.0.0:123 :
UDP 0.0.0.0:500 :
UDP 0.0.0.0:3702 :
UDP 0.0.0.0:3702 :
UDP 0.0.0.0:3702 :
UDP 0.0.0.0:3702 :
UDP 0.0.0.0:4500 :
UDP 0.0.0.0:5004 :
UDP 0.0.0.0:5005 :
UDP 0.0.0.0:5355 :
UDP 0.0.0.0:17500 :
UDP 0.0.0.0:50312 :
UDP 0.0.0.0:51445 :
UDP 127.0.0.1:1900 :
UDP 127.0.0.1:48000 :
UDP 127.0.0.1:53080 :
UDP 127.0.0.1:64309 :
UDP 192.168.10.1:137 :
UDP 192.168.10.1:138 :
UDP 192.168.10.1:1900 :
UDP 192.168.10.1:53079 :
UDP [::]:123 :
UDP [::]:500 :
UDP [::]:3702 :
UDP [::]:3702 :
UDP [::]:3702 :
UDP [::]:3702 :
UDP [::]:5004 :
UDP [::]:5005 :
UDP [::]:5355 :
UDP [::]:50313 :
UDP [::]:51446 :
UDP [::1]:1900 :
UDP [::1]:53077 :
UDP [fe80::2ca5:28b7:3f57:f5fe%10]:1900 :
UDP [fe80::2ca5:28b7:3f57:f5fe%10]:53078 :
UDP [fe80::59d6:b7e4:ef18:4051%11]:546 :
UDP [fe80::59d6:b7e4:ef18:4051%11]:1900 :
UDP [fe80::59d6:b7e4:ef18:4051%11]:53076 :

I am not an expert here but does that look like the normal results you would be getting?

Just FYI 192.168.10.1 is the server called (rather obviously) server. the hosts file is as follows:-
127.0.0.1 localhost
#::1 localhost

I have no idea why #::1 is in there.

Thanks in advance

::1 is IPv6 localhost, thats fine.

The number of connections there looks fine, there isn’t too many - thats more what I was trying to say, if theres a lot, or a lot in a TIME_WAIT state they could be blocking the server, but thats not the case there. Theres some, but not enough to be of any concern.

Seeing a few mysql connections, is it possible that it IS working, but something is taking a little too long to answer, and you are then running into the per IP restrictions, iirc I believe its 2 per IP by default. I know if I, for example, run a slow mysql query, I can’t access phpmyadmin in the same browser until the query finishes.

Thanks for getting back Tim, I really appreciate it.

I ahve just done another netstat and the following waits
TCP 192.168.10.1:80 192.168.10.11:2975 TIME_WAIT
TCP 192.168.10.1:80 192.168.10.11:2977 ESTABLISHED
TCP 192.168.10.1:80 192.168.10.11:2978 TIME_WAIT
TCP 192.168.10.1:80 PC-7:4531 FIN_WAIT_1
TCP 192.168.10.1:80 MJS:2199 TIME_WAIT
TCP 192.168.10.1:80 MJS:2200 ESTABLISHED
TCP 192.168.10.1:80 MJS:2201 ESTABLISHED
TCP 192.168.10.1:80 LEWIS:4229 FIN_WAIT_1
TCP 192.168.10.1:80 LEWIS:4657 TIME_WAIT
TCP 192.168.10.1:80 LEWIS:4658 TIME_WAIT
TCP 192.168.10.1:80 LEWIS:4660 TIME_WAIT
TCP 192.168.10.1:80 LEWIS:4661 TIME_WAIT
TCP 192.168.10.1:80 LEWIS:4662 TIME_WAIT
TCP 192.168.10.1:80 LEWIS:4663 TIME_WAIT
TCP 192.168.10.1:80 192.168.10.18:1776 TIME_WAIT
TCP 192.168.10.1:80 192.168.10.18:1777 TIME_WAIT
TCP 192.168.10.1:80 192.168.10.18:1778 TIME_WAIT
TCP 192.168.10.1:80 192.168.10.18:1779 TIME_WAIT

What could be causing this. I know that each user has a lot of tabs open 8 or 9, the tabs dont auto refresh. What shall I do about it? Could it be a large table of records 50k ish records?

Thanks Again

keith

Connections are kept open, this is normal tcp communication and shouldn’t cause problems (normally). Might be worth looking into the database (use phpmyadmin or similar) and see if there are any queries taht are taking a while to complete, it might be possible to optimise them and speed everything up.

Hi Tim

Sorry to be a pain but how do I go about that? is that in the show variables command?

I am normally quite self sufficient so just point me in the right direction and I will lean as I go.

Thanks Again

Keith

SHOW PROCESSLIST; will show you any currently running queries, from there you’ll be able to see anything thats taking time and maybe be able to work out ways to speed it up :slight_smile: