Hi Eric,
I´m not pretty sure how to crank up the verbosity of nginx although I think
I got it, because when I restart Nginx I get next logs:
2014/11/14 10:00:10 [notice] 39156#0: using the "kqueue" event method2014/11/14
10:00:10 [warn] 39156#0: 1024 worker_connections exceed open file resource
limit: 2562014/11/14 10:00:10 [notice] 39156#0: nginx/1.6.02014/11/14 10:00:10
[notice] 39156#0: built by clang 5.1 (clang-503.0.40) (based on LLVM
3.4svn)2014/11/14 10:00:10 [notice] 39156#0: OS: Darwin 13.4.02014/11/14
10:00:10 [notice] 39156#0: hw.ncpu: 42014/11/14 10:00:10 [notice] 39156#0:
net.inet.tcp.sendspace: 1310722014/11/14 10:00:10 [notice] 39156#0:
kern.ipc.somaxconn: 1282014/11/14 10:00:10 [notice] 39156#0:
getrlimit(RLIMIT_NOFILE): 256:92233720368547758072014/11/14 10:00:10 [notice]
39157#0: start worker processes2014/11/14 10:00:10 [notice] 39157#0: start
worker process 39158
Besides that, I got nothing else in this log when I load my website.
I think I have just one worker. Please find my nginx.conf file:
#user nobody;worker_processes 1;
#error_log logs/error.log;#error_log logs/error.log notice;#error_log
logs/error.log info;error_log logs/error.log debug;
#pid logs/nginx.pid;
events { worker_connections 1024;
}
http { include mime.types; default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" ' #
'"$http_user_agent" "$http_x_forwarded_for"';
# access_log logs/access.log main;
sendfile on; #tcp_nopush on;
#keepalive_timeout 0; keepalive_timeout 65;
#gzip on;
server { listen 80; server_name localhost;
#charset koi8-r; access_log logs/host.access.log;
rewrite_log on; location / { root
/Users/Rober/Projects/yanpy/dev/yanpy/app; index index.html
index.htm; }
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html #
error_page 500 502 503 504 /50x.html;
location = /50x.html { root html; }
}
}
Regarding your comment: Again, please do not send HTML or top-post. We adhere
to old-fashioned mailing list posting conventions here.
I don´t know what you mean. I´m answering you from my outlook web mail account.
Thanks, Roberto.
> Date: Fri, 14 Nov 2014 07:19:22 +0000
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> Subject: Re: Issue with Unicorn: Big latency when getting a request
>
> Roberto Cordoba del Moral <[email protected]> wrote:
> > Hi Eric,
> > nothing in my Nginx error.log.
> > If I point my browser directly to my endpoint by
> > localhost:8080/getTranslationLanguages I get the results in json format in
> > my browser inmediately (with no latencies). This is working fine.
> > Thanks for your support.Roberto.
>
> So the issue is with nginx communicating with unicorn, and not unicorn
> itself. Can you crank up the verbosity of nginx logging and/or strace
> an nginx worker to see what's going on?
>
> (only configure nginx to use one worker to guarantee you're stracing
> right one).
>
>
> Again, please do not send HTML or top-post. We adhere to old-fashioned
> mailing list posting conventions here. Thanks.