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

Posted on 2007-10-11
Last Modified: 2013-12-16
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.
Question by:wwward0
    LVL 28

    Accepted Solution

    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.

    Author Comment

    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.
    LVL 28

    Assisted Solution

    by:Jan Springer
    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.
    LVL 9

    Assisted Solution

    > I have excessive TCP retransmissions and duplicate acknowledgements

    This would affect all protocols, not just HTTP.  Can you verify that with ttcp/netperf/iperf?

    Author Comment

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now