title: Is php scalable with reverse ajax long polling?
body: <p>I am working on a website that displays some data from DB that changes frequently (Status of a queue and a chat conversation).  My current setup is Apache/PHP/MySQL.  Naturally I would like to avoid polling the server every x seconds since this does not scale well.  I would like to do reverse ajax long polling, however, I've read that Apache does not work well with this since it quickly runs out of worker threads.  There are many other web servers out there that get around this problem: nginx, tornado, etc.  However, my problem is, PHP is the ONLY server-side scripting language I know.  Also I've already written some PHP scripts so I'd like to keep them if I can.  I am ok with switching server so long as I can still use PHP.</p>
  
  <p>But after doing some more research, I've read that people say PHP (PHP-FPM?) also creates a process for every request made, which means if I have hundreds/thousands of open connections, there will be hundreds/thousands of processes, which will be problem as well.</p>
  
  <p>Can I conclude that there's no good scalable ways to make long polling websites using PHP?  Should I abandon PHP and learn another server scripting language?  I can continue developing long polling using my current setup (Apache/PHP) for now but I don't want the choice of scripting language to pose any limitation on the scalability of my system when I deploy.  So what should I do?  I am not very experienced with web programming, so if any gurus out there can give me some pointers I'd appreciate it!  Thank you!</p>