Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: CLOSE_WAIT ports on Win.Server 2008 RC2, Apache 2.4.2 x86/64 |
|
Author |
|
kriskra
Joined: 11 May 2012 Posts: 6
|
Posted: Sat 12 May '12 0:01 Post subject: CLOSE_WAIT ports on Win.Server 2008 RC2, Apache 2.4.2 x86/64 |
|
|
Hello,
I am nearly becoming desperate. I am using the Apache 2.4.2 binaries on a newly set up Windows Server 2008 RC2 virtual instance. httpd.conf was set up fairly standard, port 80 (firewall policy set), no optimization (only timeout was reduced to 45), keep alive is off. I am using a virtual hosts configuration for 4 different domains. PHP 5.4.0 module is used. I am getting the same behaviour for both the x86 and x64 version of apache/php.
Shortly after I started the server everthing works great. After a couple of minutes (sometimes also up to a hour) the server stops responding and I am getting a lot of CLOSE_WAIT ports. Server is still responsive for queries on localhost. I have to restart the server to fix the issue, but the issue keeps reoccuring over and over again.
access.log looks fine. Every response (until the server stops) is returned with status 200. After the server stops nothing is written to the access.log anymore. error.log is empty and stays empty when the server stops.
I am really curious, I have read so much about CLOSE_WAIT ports, but nothing seems to match my scenario.
How should I continue, does anybody have an idea what could be the problem? Futhermore only a mail server and MySQL (latest release, x64) is running on the server.
Hoster confirmed that I am the only vmware on the phyiscal machine and the server is not connected to a NFS.
I would really appriciate any tipps! Thanks & regards,
Kristian
PS: AcceptFilter http none was added to httpd.conf, installing the service showed up no error. httpd process takes nearly no resources when server is not responsive (no cpu usage). |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 12 May '12 9:35 Post subject: |
|
|
Where do you see that error message CLOSE_WAIT?
Quote: |
httpd process takes nearly no resources when server is not responsive (no cpu usage).
|
Are there still 2 httpd processes? How much RAM do they consume? How long does it take until the server doesn't response anymore?
Anything in the windows event log? Did you turn on the php error log? |
|
Back to top |
|
kriskra
Joined: 11 May 2012 Posts: 6
|
Posted: Sat 12 May '12 22:52 Post subject: |
|
|
Hey, thanks to your reply.
CLOSE_WAIT ports are displayed using the command "netstat -an". Yes, there are two httpd processes. RAM consumtion is pretty decent for both threads. First one needs 10mb, second one about 30-50mb. The time until the server doesn't respond any more varies. Sometimes after 20 minutes, the longest the server stayed up was about 10 hours.
Windows event log is pretty full at the moment, but most of them is not related to Apache/PHP. I have cleared the event log und enabled the PHP log and post some results, as the server stops the next time.
Thanks for your help by now. Regards,
Kristian |
|
Back to top |
|
kriskra
Joined: 11 May 2012 Posts: 6
|
Posted: Sun 13 May '12 0:10 Post subject: |
|
|
Hmm. Seems to be a problem with PHP:
Name of Application: httpd.exe, Version: 2.4.2.0, Timestamp: 0x4f916495
Name of Module: php5ts.dll, Version: 5.4.0.0, Timestamp: 0x4f8042f7
Errorcode: 0xc0000005
Erroroffset: 0x0000000000010727
Is there any known issue with the php5ts.dll module? How should I proceed?
Thanks & regards,
Kristian |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sun 13 May '12 4:00 Post subject: |
|
|
Sort of known issues with the extensions. If you do not need an extension, do not load it as this is where the problem usually arises.
You could also run php through mod_fcgid, it puts a middleman (spawns separate process) between php and Apache so if php crashes for whatever reason, it doesn't bring down Apache with it. |
|
Back to top |
|
kriskra
Joined: 11 May 2012 Posts: 6
|
Posted: Sun 13 May '12 11:49 Post subject: |
|
|
Hello, thanks for your reply. I would install Fast CGI reluctantly. Especially because this isn't a high load server and I want to keep the configuration as simple as possible.
Therefore I will try to disable the unneeded extensions first. I will let you know if this brought some benefit.
Thanks for now & regards,
Kristian |
|
Back to top |
|
kriskra
Joined: 11 May 2012 Posts: 6
|
Posted: Sun 13 May '12 12:57 Post subject: |
|
|
Hey, so far so good. I disabled php_bz2, php_fileinfo, php_gmp, php_openssl and php_tidy and so far the server has not crashed and the event log stayed empty.
Thanks & regards,
Kristian |
|
Back to top |
|
kriskra
Joined: 11 May 2012 Posts: 6
|
Posted: Sun 13 May '12 17:01 Post subject: |
|
|
Hello,
I have located the problem. The x64 release of PHP 5.4.0 is quite unstable at the moment. The problems of crashing httpd threads, because of the issue in the php5ts.dll kept occouring. After I downgraded from PHP 5.4.0 to 5.3.10 everthing worked out.
The two fixes which solved my CLOSE_WAIT probelem where mainly:
- Adding "AcceptFilter http none" to httpd.conf
- And downgrading PHP to a more stable release
Thanks to james and glsmith for your help, the server is running smoothly now.
Thanks again & regards,
Kristian |
|
Back to top |
|
|
|
|
|
|