title: Varnish not sending PHPSESSID cookie
body: <p>I am running Varnish 3.0 in front of an Apache2 + PHP 5.3 server. My problem was that Varnish threw many 503 Service Unavailable errors, so I added a workaround, saying something like:</p>
  
  <pre><code>if http_code = 503 and cookie(REDIRECTED) = false
    set-cookie REDIRECTED=true
    header 307 redirect to same page // try again, maybe this time it doesn't fail
  else if http_code = 503 and cookie(REDIRECTED) = true
    header 503 // we tried, but the server doesn't want to
  </code></pre>
  
  <p>This is a sketch in pseudo-code of the main idea what I did. However, when the 307 redirect is being made, the cookies sent by apache in the <code>Set-Cookie</code> header, are not sent. My main concern is that the <code>PHPSESSID</code> cookie isn't being sent. If I don't get an 503 error and Varnish doesn't have to make the redirect, all works fine. Any ideas?</p>