# (99: Cannot assign requested address)

**URL:** <https://www.ruby-forum.com/t/99-cannot-assign-requested-address/127742>\
**Category:** NGINX\
**Created:** [January 31, 2008, 9:18pm UTC](https://www.ruby-forum.com/t/99-cannot-assign-requested-address/127742 "2008-01-31T21:18:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![akunz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d07c76/32.png) [@akunz](https://www.ruby-forum.com/u/akunz)\
**Post date:** [January 31, 2008, 9:18pm UTC](https://www.ruby-forum.com/t/99-cannot-assign-requested-address/127742/1 "2008-01-31T21:18:01Z")

</div>

Hello nginx users,

can anyone help me with the error? I use nginx on a debian etch server  
with danga memcached. When i run a benchmaking test with ApacheBench i  
get a lot of this messages in the error log.

2008/01/31 20:49:30 [crit] 24806#0: \*70538 connect() to 127.0.0.1:11211  
failed (99: Cannot assign requested address) while connecting to  
upstream, client: 192.168.200.10, server: [www.xxxxxxxxxx.com](http://www.xxxxxxxxxx.com), request:  
“GET /de/database/1 HTTP/1.0”, upstream: “memcached://127.0.0.1:11211”,  
host: “[www.xxxxxxxxxx.com](http://www.xxxxxxxxxx.com)”

thanks for your help.

---

<div class="post-metadata">

**Author:** ![akunz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d07c76/32.png) [@akunz](https://www.ruby-forum.com/u/akunz)\
**Post date:** [January 31, 2008, 9:58pm UTC](https://www.ruby-forum.com/t/99-cannot-assign-requested-address/127742/2 "2008-01-31T21:58:47Z")

</div>

hi,

On 31.01.2008, at 21:18, Alexander K. wrote:

> “GET /de/database/1 HTTP/1.0”, upstream: “memcached://  
> 127.0.0.1:11211”,  
> host: “[www.xxxxxxxxxx.com](http://www.xxxxxxxxxx.com)”

try to run memcached in verbose mode and check memcached for errors.

jodok

---

<div class="post-metadata">

**Author:** ![akunz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d07c76/32.png) [@akunz](https://www.ruby-forum.com/u/akunz)\
**Post date:** [February 1, 2008, 9:36pm UTC](https://www.ruby-forum.com/t/99-cannot-assign-requested-address/127742/3 "2008-02-01T21:36:10Z")

</div>

hello jodok,

many thanks for your answer. i have set the option -vv for the memcached  
but there are no error entrys in the logfile. this is the last logentry:

\<7 connection closed.  
\<7 new client connection  
\<7 get website:page:/de/database/1

> 7 sending key website:page:/de/database/1  
> 7 END  
> \<7 connection closed.

last night i read some interesting articles. when i run the

netstat -ntc

command, i get hundreds of TIME\_WAIT entrys. so  
i changed the /etc/sysctl.conf file. i changed the following  
entry from

net.ipv4.ip\_local\_port\_range = 32768 61000

to

net.ipv4.ip\_local\_port\_range = 1024 65000

now my benchmark test works fine. are there any other problems  
when i run debian with this large port range?

sincerely alexander

---

<div class="post-metadata">

**Author:** ![akunz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d07c76/32.png) [@akunz](https://www.ruby-forum.com/u/akunz)\
**Post date:** [February 1, 2008, 10:22pm UTC](https://www.ruby-forum.com/t/99-cannot-assign-requested-address/127742/4 "2008-02-01T22:22:27Z")

</div>

> No, there should no be problems.  
> You may set 1024-65535.

Thanks a lot Igor,

Alexander

---

<div class="post-metadata">

**Author:** ![akunz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d07c76/32.png) [@akunz](https://www.ruby-forum.com/u/akunz)\
**Post date:** [February 1, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/99-cannot-assign-requested-address/127742/5 "2008-02-01T22:14:13Z")

</div>

On Fri, Feb 01, 2008 at 09:36:10PM +0100, Alexander Daniel wrote:

> to
> 
> net.ipv4.ip\_local\_port\_range = 1024 65000
> 
> now my benchmark test works fine. are there any other problems  
> when i run debian with this large port range?

No, there should no be problems.  
You may set 1024-65535.
