开发者

Memory Leaks Comet Server in PHP

开发者_StackOverflow

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜