# Nginx + gunicorn + web.py

**URL:** <https://www.ruby-forum.com/t/nginx-gunicorn-web-py/220927>\
**Category:** NGINX\
**Created:** [June 25, 2012, 4:55pm UTC](https://www.ruby-forum.com/t/nginx-gunicorn-web-py/220927 "2012-06-25T16:55:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [June 25, 2012, 4:55pm UTC](https://www.ruby-forum.com/t/nginx-gunicorn-web-py/220927/1 "2012-06-25T16:55:41Z")

</div>

Hello everyone,

As you can see in configuration, we have nginx servers (there are 2 of  
them) as reverse proxy which keep requests balanced for 6 gunicorn  
application(web.py framework) nodes.

In python part, we calculate execution time and we know that application  
part completes in ~0.02 sec per request but it takes 60-300 milliseconds  
to  
see it on browser in the beginning which is acceptable for us.

In time (~20-30 minutes), active connection number increases to 1000+  
from  
300+. Our python application still completes in ~0.02 sec but it takes  
sometimes even 30 seconds to see it on browser.

_/nginx\_status_  
Active connections: 361  
server accepts handled requests  
71644 71644 195385  
Reading: 0 Writing: 13 Waiting: 348

\*Gunicorn: \*[http://pastebin.com/CY8m922F](http://pastebin.com/CY8m922F)  
_Nginx:_ [http://pastebin.com/7bx5H33Q](http://pastebin.com/7bx5H33Q)

Do you have any idea?

On the other hand; is that feasible way to deliver a web.py application?

Thanks.  
-Umut
