Why would a Comet Server like Tornado be especially prone to memory leaks if written in PHP?
Are there genuine weaknesses particular to PHP for implementing a long polling framework/service like Tornado?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The gist of it is that PHP was originally written with the intent of having a brand new process for every request that you could just throw away once said request ended, at a time where things like Comet and long polling weren’t really on the table.
As such there are quite a few areas – notably the garbage collector – where at its origin PHP just wasn’t made for running during a long period of time, and it didn’t care much because every http request got a brand new php instance.
It got clearly better in the recent years, but I still wouldn’t use it for creating that sort of long-lifetime applications.