<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><div>Hi Peter<br><div><br><div>Thanks for your reply.<br><div><br><div>I am not using script, I am creating a streamer project where i am using libcurl to download the content from nginx server.<br><div><div>Since the content i am downloading is HLS, i am downloading every ~5sec.<br><div><br>During the stress test i am seeing "couldn't connect to server" error for HTTP request. With one or two service i don't see this problem.<br></div></div><div><br><br></div></div></div></div></div></div></div><div><br></div><div class="ydp28dcf38esignature"><div><span>Regards</span></div><div style="color:rgb(0, 0, 0);font-size:13px;font-family:arial, helvetica, clean, sans-serif;background-color:transparent;font-style:normal;"><span>Mohanaprakash T<br></span></div></div></div>
<div><br></div><div><br></div>
<div id="ydp7b087b0cyahoo_quoted_5635890794" class="ydp7b087b0cyahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Friday, 27 April, 2018, 9:30:46 PM IST, Peter Booth <peter_booth@me.com> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="ydp7b087b0cyiv7891615422"><div>I’m guessing that you have script that keeps executing curl. What you can do is use curl -K ./fileWithListOfUrls.txt<div class="ydp7b087b0cyiv7891615422">and the one curl process will visit each url in turn reusing the socket (aka HTTP keep alive)</div><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"></div><div class="ydp7b087b0cyiv7891615422">That said, curl isn’t a great workload simulator and, in the long time, you can get better results from something like wrk2</div><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"><div><br class="ydp7b087b0cyiv7891615422" clear="none"><blockquote class="ydp7b087b0cyiv7891615422" type="cite"><div class="ydp7b087b0cyiv7891615422yqt3469594312" id="ydp7b087b0cyiv7891615422yqt61407"><div class="ydp7b087b0cyiv7891615422">On 27 Apr 2018, at 11:32 AM, mohan prakash via nginx <<a shape="rect" class="ydp7b087b0cyiv7891615422" href="mailto:nginx@nginx.org" rel="nofollow" target="_blank">nginx@nginx.org</a>> wrote:</div><br class="ydp7b087b0cyiv7891615422Apple-interchange-newline" clear="none"><div class="ydp7b087b0cyiv7891615422"><div class="ydp7b087b0cyiv7891615422"><div class="ydp7b087b0cyiv7891615422" style="font-family: Helvetica, Arial, sans-serif; font-size: 13px;"><div class="ydp7b087b0cyiv7891615422" style="font-family: Helvetica, Arial, sans-serif; font-size: 13px;"><div class="ydp7b087b0cyiv7891615422"><div class="ydp7b087b0cyiv7891615422">Hi Liu<br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422">Client side I have increased the file descriptor value to 10000 , but still the same issue .<br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422">Also increased the FD in server side also then also same issue continuous.<br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422"><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422">Followed below link to increase the FD limit.<br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none"></div></div></div><div class="ydp7b087b0cyiv7891615422"><a shape="rect" class="ydp7b087b0cyiv7891615422enhancr_card_5357452550" href="https://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/" rel="nofollow" target="_blank">Linux Increase The Maximum Number Of Open Files / File Descriptors (FD) - nixCraft</a><br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none"></div></div><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"></div><div class="ydp7b087b0cyiv7891615422ydp57e7fed9ymail-preserve-class ydp7b087b0cyiv7891615422ydp57e7fed9yahoo-link-enhancr-card ydp7b087b0cyiv7891615422ydp57e7fed9ymail-preserve-style" id="ydp7b087b0cyiv7891615422ydp57e7fed9enhancr_card_5357452550" style="max-width:400px;" data-url="https://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/" data-type="YENHANCER" data-size="MEDIUM" contenteditable="false"><a shape="rect" class="ydp7b087b0cyiv7891615422ydp57e7fed9yahoo-enhancr-cardlink" href="https://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/" style="text-decoration:none;" rel="nofollow" target="_blank"><table class="ydp7b087b0cyiv7891615422ydp57e7fed9card-wrapper ydp7b087b0cyiv7891615422ydp57e7fed9yahoo-ignore-table" style="max-width:400px;" cellspacing="0" cellpadding="0" border="0"><tbody class="ydp7b087b0cyiv7891615422"><tr class="ydp7b087b0cyiv7891615422"><td colspan="1" rowspan="1" class="ydp7b087b0cyiv7891615422" width="400"><table class="ydp7b087b0cyiv7891615422ydp57e7fed9card ydp7b087b0cyiv7891615422ydp57e7fed9yahoo-ignore-table" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224, 228, 233);border-radius:2px;" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody class="ydp7b087b0cyiv7891615422"><tr class="ydp7b087b0cyiv7891615422"><td colspan="1" rowspan="1" class="ydp7b087b0cyiv7891615422ydp57e7fed9card-primary-image-cell" style="background-color:rgb(0, 0, 0);background-repeat:no-repeat;background-size:cover;position:relative;border-radius:2px 2px 0px 0px;min-height:175px;" valign="top" bgcolor="#000000" background="https://s.yimg.com/lo/api/res/1.2/CvY.5LPlv3yd7pg6szq4og--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://www.cyberciti.biz/media/new/category/old/linux-logo.png.cf.jpg" height="175"><table class="ydp7b087b0cyiv7891615422ydp57e7fed9card-overlay-container-table ydp7b087b0cyiv7891615422ydp57e7fed9yahoo-ignore-table" style="width:100%;" cellspacing="0" cellpadding="0" border="0"><tbody class="ydp7b087b0cyiv7891615422"><tr class="ydp7b087b0cyiv7891615422"><td colspan="1" rowspan="1" class="ydp7b087b0cyiv7891615422ydp57e7fed9card-overlay-cell" style="background-color:transparent;border-radius:2px 2px 0px 0px;min-height:175px;" valign="top" bgcolor="transparent" background="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"><table class="ydp7b087b0cyiv7891615422ydp57e7fed9yahoo-ignore-table" style="width:100%;min-height:175px;" border="0" height="175"><tbody class="ydp7b087b0cyiv7891615422"><tr class="ydp7b087b0cyiv7891615422"><td colspan="1" rowspan="1" class="ydp7b087b0cyiv7891615422ydp57e7fed9card-richInfo2" style="text-align:left;padding:15px 0 0 15px;vertical-align:top;"></td><td colspan="1" rowspan="1" class="ydp7b087b0cyiv7891615422ydp57e7fed9card-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top;"><div class="ydp7b087b0cyiv7891615422ydp57e7fed9card-share-container"></div></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr class="ydp7b087b0cyiv7891615422"><td colspan="1" rowspan="1" class="ydp7b087b0cyiv7891615422"><table class="ydp7b087b0cyiv7891615422ydp57e7fed9card-info ydp7b087b0cyiv7891615422ydp57e7fed9yahoo-ignore-table" style="background-color:rgb(255, 255, 255);background-image:none;background-repeat:repeat;background-attachment:scroll;background-size:auto auto;position:relative;z-index:2;width:100%;max-width:400px;border-radius:0px 0px 2px 2px;border-top:1px solid rgb(224, 228, 233);" align="center" cellspacing="0" cellpadding="0" border="0"><tbody class="ydp7b087b0cyiv7891615422"><tr class="ydp7b087b0cyiv7891615422"><td colspan="1" rowspan="1" class="ydp7b087b0cyiv7891615422" style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px;"></td><td colspan="1" rowspan="1" class="ydp7b087b0cyiv7891615422" style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;"><h2 class="ydp7b087b0cyiv7891615422ydp57e7fed9card-title" style="font-size:14px;line-height:19px;margin:0 0 6px 0;">Linux Increase The Maximum Number Of Open Files / File Descriptors (FD) ...</h2><div class="ydp7b087b0cyiv7891615422" style="font-size:12px;line-height:16px;margin:0px;color:rgb(151, 155, 167);">How do I increase the maximum number of open files under CentOS Linux? How do I open more file descriptors under...</div></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"></div><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"></div></div></div></div></div></div><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"></div><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"></div><div class="ydp7b087b0cyiv7891615422ydp2c199f2bsignature"><div class="ydp7b087b0cyiv7891615422"><span class="ydp7b087b0cyiv7891615422">Regards</span></div><div class="ydp7b087b0cyiv7891615422" style="font-size:13px;font-family:arial, helvetica, clean, sans-serif;background-color:transparent;font-style:normal;"><span class="ydp7b087b0cyiv7891615422">Mohanaprakash T<br class="ydp7b087b0cyiv7891615422" clear="none"></span></div></div></div>
<div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"></div><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"></div>
</div><div class="ydp7b087b0cyiv7891615422ydp26fcc155yahoo_quoted" id="ydp7b087b0cyiv7891615422ydp26fcc155yahoo_quoted_5805319009">
<div class="ydp7b087b0cyiv7891615422" style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div class="ydp7b087b0cyiv7891615422">
On Friday 27 April 2018, 7:06:51 PM IST, Liu Lantao <<a shape="rect" class="ydp7b087b0cyiv7891615422" href="mailto:liulantao@gmail.com" rel="nofollow" target="_blank">liulantao@gmail.com</a>> wrote:
</div>
<div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"></div>
<div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"></div>
<div class="ydp7b087b0cyiv7891615422"><div class="ydp7b087b0cyiv7891615422" id="ydp7b087b0cyiv7891615422ydp26fcc155yiv0641264340"><div class="ydp7b087b0cyiv7891615422">It seems like your client has reach the limit of max open files. <br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none">From the shell where you start you client program, run ‘ulimit -a’ to check the settings.<br class="ydp7b087b0cyiv7891615422" clear="none">You can also check the files open by your client in /proc/<pid>/fd/.<br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none">Increase that value is simple, you can change is temporarily or save to config file,<br class="ydp7b087b0cyiv7891615422" clear="none">there are tons of documents online about how to change it.<br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422ydp26fcc155yiv0641264340gmail_quote"><div class="ydp7b087b0cyiv7891615422ydp26fcc155yiv0641264340yqt4610531161" id="ydp7b087b0cyiv7891615422ydp26fcc155yiv0641264340yqt94153"><div class="ydp7b087b0cyiv7891615422" dir="ltr">On Fri, Apr 27, 2018 at 9:09 PM mohan prakash via nginx <<a shape="rect" class="ydp7b087b0cyiv7891615422" href="mailto:nginx@nginx.org" rel="nofollow" target="_blank">nginx@nginx.org</a>> wrote:<br class="ydp7b087b0cyiv7891615422" clear="none"></div><blockquote class="ydp7b087b0cyiv7891615422ydp26fcc155yiv0641264340gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="ydp7b087b0cyiv7891615422"><div class="ydp7b087b0cyiv7891615422" style="font-family: Helvetica, Arial, sans-serif; font-size: 13px;"><div class="ydp7b087b0cyiv7891615422"><div class="ydp7b087b0cyiv7891615422">Hi Team<br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422">I am trying execute ~1000 curl request from my CentOS machine to my nginx server in ~5 sec.<br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422">The same exercise continuous every ~5sec.<br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422">I am using libcurl to make the HTTP request.<br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422">During this process i see most of my request are failed with reason<br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422"><span class="ydp7b087b0cyiv7891615422"><b class="ydp7b087b0cyiv7891615422">Failure Curl Error Code[ 7 ] Reason[ Couldn't connect to server ]</b><br class="ydp7b087b0cyiv7891615422" clear="none"></span><span class="ydp7b087b0cyiv7891615422"></span><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422">Can someone suggest whether i am missing any configuration info in my nginx server. Below is my nginx server configuration<br class="ydp7b087b0cyiv7891615422" clear="none"><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"><span class="ydp7b087b0cyiv7891615422">user nginx;<br class="ydp7b087b0cyiv7891615422" clear="none">worker_processes auto;<br class="ydp7b087b0cyiv7891615422" clear="none">error_log /var/log/nginx/error.log;<br class="ydp7b087b0cyiv7891615422" clear="none">pid /run/nginx.pid;<br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none"># Load dynamic modules. See /usr/share/nginx/README.dynamic.<br class="ydp7b087b0cyiv7891615422" clear="none">include /usr/share/nginx/modules/*.conf;<br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none">worker_rlimit_nofile 262144;<br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none">events {<br class="ydp7b087b0cyiv7891615422" clear="none"> worker_connections 16384;<br class="ydp7b087b0cyiv7891615422" clear="none">}<br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none">http {<br class="ydp7b087b0cyiv7891615422" clear="none"> log_format main '$remote_addr - $remote_user [$time_local] "$request" '<br class="ydp7b087b0cyiv7891615422" clear="none"> '$status $body_bytes_sent "$http_referer" '<br class="ydp7b087b0cyiv7891615422" clear="none"> '"$http_user_agent" "$http_x_forwarded_for"';<br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none"> access_log /var/log/nginx/access.log main;<br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none"> sendfile on;<br class="ydp7b087b0cyiv7891615422" clear="none"> tcp_nopush on;<br class="ydp7b087b0cyiv7891615422" clear="none"> tcp_nodelay on;<br class="ydp7b087b0cyiv7891615422" clear="none"> keepalive_timeout 65;<br class="ydp7b087b0cyiv7891615422" clear="none"> types_hash_max_size 2048;<br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none"> include /etc/nginx/mime.types;<br class="ydp7b087b0cyiv7891615422" clear="none"> default_type application/octet-stream;<br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none"> # Load modular configuration files from the /etc/nginx/conf.d directory.<br class="ydp7b087b0cyiv7891615422" clear="none"> # See <a shape="rect" class="ydp7b087b0cyiv7891615422" href="http://nginx.org/en/docs/ngx_core_module.html#include" rel="nofollow" target="_blank">http://nginx.org/en/docs/ngx_core_module.html#include</a><br class="ydp7b087b0cyiv7891615422" clear="none"> # for more information.<br class="ydp7b087b0cyiv7891615422" clear="none"> include /etc/nginx/conf.d/*.conf;<br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none"> limit_conn_zone $binary_remote_addr zone=perip:10m;<br class="ydp7b087b0cyiv7891615422" clear="none"> limit_conn_zone $server_name zone=perserver:10m;<br class="ydp7b087b0cyiv7891615422" clear="none"><br class="ydp7b087b0cyiv7891615422" clear="none"> server {<br class="ydp7b087b0cyiv7891615422" clear="none"> limit_conn perip 2000;<br class="ydp7b087b0cyiv7891615422" clear="none"> limit_conn perserver 20000;<br class="ydp7b087b0cyiv7891615422" clear="none"> listen *:8080 backlog=16384;<br class="ydp7b087b0cyiv7891615422" clear="none"> }<br class="ydp7b087b0cyiv7891615422" clear="none">}</span><br class="ydp7b087b0cyiv7891615422" clear="none"></div></div></div></div></div></div></div></div></div></div></div></div></div><div class="ydp7b087b0cyiv7891615422"><br class="ydp7b087b0cyiv7891615422" clear="none"></div><div class="ydp7b087b0cyiv7891615422ydp26fcc155yiv0641264340m_2507225275403369716ydp2b8ea2csignature"><div class="ydp7b087b0cyiv7891615422"><span class="ydp7b087b0cyiv7891615422">Regards</span></div><div class="ydp7b087b0cyiv7891615422" style="font-size:13px;font-family:arial, helvetica, clean, sans-serif;background-color:transparent;font-style:normal;"><span class="ydp7b087b0cyiv7891615422">Mohanaprakash T<br class="ydp7b087b0cyiv7891615422" clear="none"></span></div></div></div></div></div>_______________________________________________<br class="ydp7b087b0cyiv7891615422" clear="none">
nginx mailing list<br class="ydp7b087b0cyiv7891615422" clear="none">
<a shape="rect" class="ydp7b087b0cyiv7891615422" href="mailto:nginx@nginx.org" rel="nofollow" target="_blank">nginx@nginx.org</a><br class="ydp7b087b0cyiv7891615422" clear="none">
<a shape="rect" class="ydp7b087b0cyiv7891615422" href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="nofollow" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></blockquote></div></div></div></div></div>
</div>
</div></div></div>_______________________________________________<br class="ydp7b087b0cyiv7891615422" clear="none">nginx mailing list<br class="ydp7b087b0cyiv7891615422" clear="none"><a shape="rect" class="ydp7b087b0cyiv7891615422" href="mailto:nginx@nginx.org" rel="nofollow" target="_blank">nginx@nginx.org</a><br class="ydp7b087b0cyiv7891615422" clear="none">http://mailman.nginx.org/mailman/listinfo/nginx</div></div></blockquote></div><br class="ydp7b087b0cyiv7891615422" clear="none"></div></div></div></div>
</div>
</div></div></body></html>