PHP-FPM and too many requests - eviltoast

I noticed that if you have too few pm_children set then some requests hang until timeout. This surprised me - I’d expect an immediate error, but it’s more like a tarpit! For ages I was thinking my server was not performant, then I noticed via top that it wasn’t doing or waiting while the browser was.

I have two questions:

  1. If you have pm_max_children=1 and you occupy that and submit another request, what actually happens? (I’m proxying through nginx.) HTTP doesn’t have a “40_ Come back later”.

  2. (if life deals you lemons…) if you can generate a tarpit that doesn’t use server resources, this could be quite useful to know about too!

  • nettie@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 days ago

    Right Thanks. So I think php might queue then forget some requests, because I’ve had this behaviour without too much traffic. I just don’t know how to reproduce it, but maybe I’ll try with that listen backlog setting, thanks for tip.

    • Max-P@lemmy.max-p.me
      link
      fedilink
      arrow-up
      2
      ·
      3 days ago

      It doesn’t forget requests, but NGINX will drop them after it times out if it takes too long.