logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Is "EnableSendfile off" necessary?
Author
lunter



Joined: 12 May 2011
Posts: 10

PostPosted: Mon 11 Feb '13 14:43    Post subject: Is "EnableSendfile off" necessary? Reply with quote

Is "EnableSendfile off" necessary?

EnableSendfile has default value "off"

http://httpd.apache.org/docs/2.4/mod/core.html#EnableSendfile
Back to top
CamaroSS



Joined: 24 Jan 2013
Posts: 78
Location: RF, Tver

PostPosted: Mon 11 Feb '13 15:58    Post subject: Reply with quote

I think it's necessary on non-server versions of Windows. On Win Server 2008 R2, I get better results with this option enabled.
Back to top
japi



Joined: 05 Jan 2013
Posts: 6
Location: Frankfurt

PostPosted: Mon 11 Feb '13 21:46    Post subject: Reply with quote

I had to disable it (Windows Server 2008 R2), because my server kept crashing/hanging.
If you plan to use SSL (I do) and your server crashes without reason, have a look at http://www.apachelounge.com/viewtopic.php?t=4862

It seems to be a known bug with SSL and disabling EnableSendfile is part of the workaround.
Since using the settings suggested in that thread I had no single crash. Smile

If you don't need SSL then you may have better performance keeping it enabled.

Best regards
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 11 Feb '13 23:42    Post subject: Reply with quote

In 2.4 it's off by default, so turning it off does nothing.
http://httpd.apache.org/docs/2.4/mod/core.html#enablesendfile

As far as the SSL problem, it's not just SSL and the AcceptEx() problem was fixed with the directives
AccetFilter protocol none

EnableMMAP which was part of the posted solution defaults to On, this might have been what was causing crashing for the above poster.
http://httpd.apache.org/docs/2.4/mod/core.html#enablemmap

It carries two warnings with it;
1. On some multiprocessor systems, memory-mapping can reduce the performance of the httpd
2. Deleting or truncating a file while httpd has it memory-mapped can cause httpd to crash with a segmentation fault.

I myself leave both EnableSendfile and EnableMMAP at their default. If I have file downloads larger than ~80MB, I also have an .htaccess file in the directory turning EnableSendFile On and EnableMMAP Off. I find I get the best performance this way.
Back to top


Reply to topic   Topic: Is "EnableSendfile off" necessary? View previous topic :: View next topic
Post new topic   Forum Index -> Apache