FreeBSD: Apache httpready filter – Failed to enable the 'httpready' Accept Filter

by Vivek Gite · 3 comments

Q. I've installed Apache 2.2 from FreeBSD 7.0 ports and when I try to start I get following warning on screen:

Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
[Wed Sep 17 22:01:58 2008] [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter

How do I fix this error?

A. FreeBSD has special driver called accf_http. It will buffer incoming connections until a certain complete HTTP requests arrive to speed up and optimize performance.

The utility of accf_http is such that a server will not have to context switch several times before performing the initial parsing of the request. This effectively reduces the amount of required CPU utilization to handle incoming requests by keeping active processes in preforking servers such as Apache low and reducing the size of the file descriptor set that needs to be managed by interfaces such as select(), poll() or kevent() based servers.

Just open shell prompt and type the following command to load accf_http under FreeBSD :
# kldload accf_http
Restart apache:
# /usr/local/etc/rc.d/apache22 restart

Update /boot/loader.conf file

Type the following command so that driver get loaded at the time of booting system:
# echo 'accf_http_load="YES"' >> /boot/loader.conf

A note about FreeBSD jails (vps)

Under jail you cannot load this module. It needs to be loaded from host using above command.

Featured Articles:

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 3 comments… read them below or add one }

1 Florin Grosu 06.25.09 at 2:19 pm

Is there any other linux distro with this option? Or a “accf_http like” way for red hat, or ubuntu? I’m asking this question, having in mind the slowloris attack.

2 Vivek Gite 06.25.09 at 3:42 pm

Noop, there is not such thing for Linux. Set your apache timeout to 30, use iptables to limit connection per IP, there is also unoffical patch that changes Timeout on fly.

3 motivez 01.31.10 at 9:46 pm

I have done the above, but whenever I get a graceful restart request during log rollovers, I am still getting the error.. additionally, my Apache is segfaulting after every graceful restart.

Any suggestions?

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous FAQ:

Next FAQ:

nixCraft FAQ PDF Collection Now Available To All