MacOS – Apache truncates files at 65536 bytes after Mavericks upgrade

apachemacosmacports

I was using a mac-ports based LAMP stack before upgrading to Mavericks from Mountain Lion and all was fine..

After the upgrade, apache has started truncating static files.. If I use curl to fetch a static asset, like a Javascript file, it the connection hangs at 65,536 bytes downloaded.

  • The file is ok (if you cat the file, the whole thing is readable)

  • Browser/cURL works fine with other hosts.

  • Tried OSX permissions check

  • Tried upgrading macports -> port selfupdate -> port uninstall all -> port clean all -> port install $everything and the behavior continues..

  • lsof reports that apache is reading all the correct library references to the mac ports versions..

Best Answer

It turned out that by having internet sharing on, something bad was happening with the inbound TCP buffer on the NIC interface as remote users could pull the asset off my box without a problem.

Turning it off fixed the problem...