title: How is RAM handled when running a websocket server with PHP?
body: <p>I have setup Ratchet to manage a multi room chat server. Clients can connect to a room and chat to the people inside and it all goes through a websocket connection. To prepare for increased user load, I want to know how the memory is handled by the server side process.</p>
  
  <p>When I run the PHP server script (ratchet) it launches the server and the port is now ready to get requests from the client. What application manages the memory for this? I am running the PHP script from the command line. Does PHP get Apache handle any of this? My server has 16GB of RAM, but PHP is only allowed to use 256mb. If this single script manages everything it is most definitely going to hit that limitation. At the same time, is it a good idea to be giving a single PHP script the ability to consume a few GB of RAM? Whats the best way to keep on top of memory requirements in this scenario?</p>