Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1326
  • Last Modified:

HTTP FORM POST to Linux/Apache/PHP slow or fails with Mac/XP/Vista Clients

I have excessive TCP retransmissions and duplicate acknowledgements when Windows Vista IE7 users attempt to do a simple FORM POST with a JPEG image to a simple upload.php script on my Apache 2.2.6 server running on CentOS 5 with PHP 5.2.4.

On Macintosh, Firefox and Safari perform slowly when uploading a 50k JPEG.  Windows XP using Firefox and IE6 also perform slowly, but all four of these combinations upload the file within 2 minutes.  Vista with Firefox also performs slowly, uploading within 2 minutes.  I have not yet tested IE7 on XP.

I have tested a number of things:
The upload script works fine from Vista and IE7 when running on Red Hat Enterprise Linux 4 with Apache 2.2.3 and PHP 5.1.4.  Both the problem machine, and the non-problem machine are running on ESX 3.0.2 hosts (I have migrated both hosts to different ESX cluster nodes to rule out networking issues.)

I have built a second RHEL4 host with packages installed only from the Red Hat Network.  I have not customized the configuration of Apache 2.0.52 or PHP 4.3.9 on this new box - and yet it has the SAME issue as the CentOS 5 box.  I have tried using both the VMWare tools NIC and the default PCNET32 NIC.

I copied the CentOS virtual machine to a development lab ESX node in our local facility (the others are in a datacenter) but the problem continues to be evident when the client and server are on the same network segment.

What I don't know, and haven't been able to find through general internet research, is whether there are settings in Apache or PHP that successful sites have been tuning to accommodate form posts from Vista+IE7.  I'm convinced this is not a layer 2 issue because I've relocated the affected virtual machine to two physically separate networks, and tested using two independently constructed Vista workstations (not from an image.)

Since the problem is also evident in XP and Mac as slow upload performance, I believe the problem may be related to the method used by Apache or PHP to accept this form data.  SFTP and SSH do not seem affected.
0
wwward0
Asked:
wwward0
  • 2
  • 2
3 Solutions
 
Jan SpringerCommented:
If the speed and duplex on the ethernet cards of the servers are set to match the settings on the connected switch, this sounds like a network issue.

You can verify ethernet errors with 'netstat -ni'.

Somewhere, perhaps, the tcp maximum segment size needs to be set lower on an interface toward your servers.
0
 
wwward0Author Commented:
Jesper - I would tend to agree except the following:
1.  The machine has been tested on multiple networks, ruling out the possibility that the VMWare ESX host is misconfigured - additionally, the ESX hosts use gigabit ethernet, which is always autonegotiating.
2.  Other machines on this network switch are not affected.  One case in point - a different Red Hat Linux 4 server running different versions of Apache and PHP works fine.  I am in the process of examining the differences in the configurations.

ifconfig does not reveal any errors, however, this is a virtual network adapter, so such errors would likely be masked by the virtualization.

I'm certain the problem is related to configuration or software compatibility.  But I have no expertise with this particular platform - certainly, in the past, I've never encountered this sort of issue when using Apache and PHP for other projects.
0
 
Jan SpringerCommented:
Is there any log data associated with the virtual adapter that would help?

And, can the switch ports connecting your switch(es) be verified for speed and duplex?  I prefer to do auto negotiation but there are times when auto just does not work.
0
 
svsCommented:
> I have excessive TCP retransmissions and duplicate acknowledgements

This would affect all protocols, not just HTTP.  Can you verify that with ttcp/netperf/iperf?
0
 
wwward0Author Commented:
Thanks for the assistance.  The real issue is convoluted, but we're working:

The past week was spent troubleshooting a problem evident with uploading photos using a FORM POST method to Apache on CentOS5 Linux.  The server was configured properly, as it turns out, but may be having other issues.  I say that the server was configured properly, because, using VMWare ESX, I cloned the server virtual machine, and use it for the production site.  That leads me to think the network or firewall where the development host resides is at issue.

The week of troubleshooting involved relocating the virtual machine to other networks - building a fresh Red Hat 4 install, and studying the configuration of the server.  None of this made a difference after I learned that the Adobe Flash uploader had been hard-coded to connect to the development server IP.

So despite efforts to isolate the problem, in the end - in our haste - we missed this crucial bit.

Once the developers submitted a copy which did not connect to the development server, the behavior was eliminated.

My head hurts, but at least my weekend is free.

Thanks,
Bill
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now