Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running "Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny3 with Suhosin-Patch" inside a virtual machine (debian lenny, up2date) with NAT and about 60% of any http response gets served "incomplete" when serving requests from smb mounted directories (i.e. from the vm host).

My problem is, i cannot see any pattern which response when fails, because they kind of rotate. But what i can see is, that some requests like jquery ui always gets truncated at the same position (javascript console reports syntax error).

This is an example header of a response that was incomplete:

Date    Fri, 04 Sep 2009 21:09:38 GMT
Server  Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny3 with Suhosin-Patch
Last-Modified   Sat, 20 Jun 2009 11:53:52 GMT
Etag    "1810-2f074-46cc64b731400"
Accept-Ranges   bytes
Content-Length  192628
Connection  close
Content-Type    application/javascript

Enabled apache2 mods:

alias.conf            authz_user.load  dir.load          php5.load
alias.load            autoindex.conf   env.load          rewrite.load
auth_basic.load       autoindex.load   mime.conf         setenvif.conf
authn_file.load       cgi.load         mime.load         setenvif.load
authz_default.load    deflate.conf     negotiation.conf  status.conf
authz_groupfile.load  deflate.load     negotiation.load  status.load
authz_host.load       dir.conf         php5.conf

Only .js and .png files are affected in my particular project. The "main request" always loads fine.

update: apache2ctl -m output:

Loaded Modules:
 core_module (static)
 log_config_module (static)
 logio_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_default_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 php5_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 status_module (shared)
Syntax OK
share|improve this question
To list the loaded Apache 2 modules please run httpd -M, that what you have provided is just a list of files and does not help us in maybe locating the issue. – X-Istence Sep 4 '09 at 21:34
updated the question, thank you – Karsten Sep 4 '09 at 21:57
Please list the full response headers. The example you gave doesn't include the response status code. Is the reported Content-Length (192628) the same as the actual size of the file you are trying to download? – sagi Sep 5 '09 at 0:14
up vote 3 down vote accepted

I've seen this when serving files from SMB- or CIFS-mounted shares. Try turning off sendfile support using:

EnableSendfile Off

You can do this in the main server configuration, .htacces file or in a vhost/directory block.

share|improve this answer
this actually works, thank you very much :) – Karsten Sep 6 '09 at 9:11
Glad to be of service! – markdrayton Sep 6 '09 at 11:43
PS to make it easier for Google and others with the same problem can you edit your question to say you're serving from an SMB mount? Thanks! – markdrayton Sep 6 '09 at 15:28
@markdrayton: done – Karsten Sep 7 '09 at 15:43

Well, i switched the files from a mounted windows smb-share to a local directory, and it now works fine. I don't have the time to investigate this further, but i think the problem was not related to apache itself.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.