<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 26/10/2010 10:30, SplitIce wrote:
    <blockquote
      cite="mid:AANLkTi=YwVnkbkEOXqPbbejFGBjVwqhhhwSKYFbbG5p=@mail.gmail.com"
      type="cite">Ok although I dont know the scale of your site that
      formulae always works, A decent response time for an application
      is 0.05s, even most forums will return 0.2s so if you are getting
      values higher than that then your problem is in your script.<br>
      <br>
      This isnt really a nginx problem, its more PHP related.<br>
      <br>
      <div class="gmail_quote">On Tue, Oct 26, 2010 at 8:24 PM, Xin Liu
        <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:liuxin84@gmail.com">liuxin84@gmail.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div>It's getting worse and worse.<br>
          </div>
          <div>From php-fpm.log, there is no error.</div>
          <div>But from nginx error.log, there are lots of errors</div>
          <div><br>
          </div>
          <div><br>
            [error] 21819#0: *16895 connect() to unix:/tmp/php-cgi.sock<br>
            failed (11: Resource temporarily unavailable) while
            connecting to upstream, client: 119.145.137.49, server:
            localhost,......&nbsp;<br>
          </div>
          <div>
            <div class="h5">
              <div><br>
              </div>
              <br>
            </div>
          </div>
        </blockquote>
      </div>
    </blockquote>
    I think this means that nginx has tried to pass a request to php,
    but php is unable to accept it due to having too much work to do.&nbsp;
    It can't make any more workers, and so it has to wait for a worker
    to finish before it can accept the request. <br>
    <br>
    Most probable is that the most recent change to the php script has
    caused some form of looping or a very inefficient lookup in the
    database (Has in index been removed recently?) <br>
    <br>
    Try going back to the php code and database before the last change,
    and seeing if that improves things. <br>
    <br>
    Regards<br>
    <br>
    Ian<br>
    <br>
  </body>
</html>