# Keepalive option without ngx\_http\_upstream\_keepalive

**URL:** <https://www.ruby-forum.com/t/keepalive-option-without-ngx-http-upstream-keepalive/219963>\
**Category:** NGINX\
**Created:** [May 23, 2012, 10:21am UTC](https://www.ruby-forum.com/t/keepalive-option-without-ngx-http-upstream-keepalive/219963 "2012-05-23T10:21:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurdipe\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b77776/32.png) [@Gurdipe\_D](https://www.ruby-forum.com/u/Gurdipe_D)\
**Post date:** [May 23, 2012, 10:21am UTC](https://www.ruby-forum.com/t/keepalive-option-without-ngx-http-upstream-keepalive/219963/1 "2012-05-23T10:21:59Z")

</div>

Hi,

is it a bug or a feature that nginx didn’t warn if keepalive is enable  
in upstream {} config, but without ngx\_http\_upstream\_keepalive module  
loaded ?

Regards,

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [May 23, 2012, 10:55am UTC](https://www.ruby-forum.com/t/keepalive-option-without-ngx-http-upstream-keepalive/219963/2 "2012-05-23T10:55:03Z")

</div>

Hello!

On Wed, May 23, 2012 at 10:21:29AM +0200, Greg wrote:

> Hi,
> 
> is it a bug or a feature that nginx didn’t warn if keepalive is  
> enable in upstream {} config, but without  
> ngx\_http\_upstream\_keepalive module loaded ?

If upstream keepalive module isn’t compiled in the following  
config

```
upstream {
    server 127.0.0.1:8080;
    keepalive 5;
}

```

produces the following error during configuration parsing:

nginx: [emerg] unknown directive “keepalive” in …

Maxim D.
