Setup:
- A Windows and a Ubuntu Server are hosted in VMware ESXi
- I have a a 6GB file on a Windows share
- The Windows share is mount on Ubuntu with
smbmount
- A symlink pointing to the 6GB file is created in a
public_html
directory, which is readable by Apache
The problem:
wget
gets an errorConnection closed at byte 2130706432. Retrying.
after downloading 2130706432 bytes (exactly 2032 MiB, and is the same every time)- Apache returns
206 Partial Content
without showing any errors in the log - Same error even if I download from
localhost
- Similar error when Firefox is used instead of
wget
- No error if I
md5sum
orcp
the file on Ubuntu, suggesting thatsmbmount
and the Windows Server are OK with 6GB files. - No error if Apache serve a 6GB file from the local disk, suggesting that Apache has no problems handling 6GB files.
Any ideas why Apache/symlink/smbmount/Windows would cause an error when used together? How can I fix the problem?
Software used:
- VMware ESXi 4 Update 1
- Windows Server 2008 R2
- Ubuntu 8.04 Server, vmxnet3
- Apache 2.2.8
- mount.cifs 1.10-3.0.28a (as returned by
smbmount -V
)
Edit: If I use CentOS 4.8 x64 instead of Ubuntu 8.04, Apache will disconnect at byte 2147483647 (2GiB - 1byte) instead of 2130706432 (2GiB - 16MiB).
I had a similar problem where I worked, check out this bug report. The issue seems to be with EnableSendfile, so put this in your Apache config for the virtual host or global config:
EnableSendfile Off
I'm pretty sure it's actually a problem with your Windows share, you need to set the block size to 4k and allow it to share it in a way that can be interpreted correctly by a client. Unfortunately this may require a volume reformat sorry.
Why don't you use a different method of distributing a file? 6GiB is a lot, and without a MD5sum check, it could be error proned. Is delivery via a distributed system possible in this case?
You mentioned smbmount as how the cifs share is mounted. smbmount and mount.cifs are 2 different animals. smbmount has a 2GB limit on files for one. But smbmount is old way of doing it and has been replaced by mount.cifs.