2 ms·
Apache rocks and is battle tested, the problem for them is that Wordpress is PHP which requires the process model worker for stability because PHP isn't thread
by gnaritas 13y ago
Apache rocks and is battle tested, the problem for them is that Wordpress is PHP which requires the process model worker for stability because PHP isn't thread safe and developers write shitty code assuming it is.
- eksith 13y ago"...because PHP isn't thread safe and developers write shitty code assuming it is." http://www.iis-aid.com/articles/my_word/difference_between_php_thread_safe_and_non_thread_safe_binaries http://www.iis-aid.com/articles/my_word/difference_between_p... "Another option is to configure IIS to use PHP in FastCGI mode which allows PHP processes to be recycled rather than killed off after each PHP request and also allows you to run several PHP processes at once, making PHP much much faster with the added bonus that as it is using the CGI interface there is little or no incompatibility issues with PHP extensions. This is still the fastest way to serve PHP, and is the way the IIS Aid PHP Installer is configured to install PHP on your IIS Environment."
- X-Istence 13y agoPHP-FPM is also pretty awesome.
- g8oz 13y agofcgid ftw
- babuskov 13y agoI looked at WordPress code and I don't recall seeing any thread stuff being used at all. The problem with WP and PHP is not stability, but large, complex and suboptimal code. One of the reasons is because WP supports everything and a kitchen sink, and all the features were just patched over it as time went by. I run custom PHP applications for thousands of users on Apache without problems. I am using nginx in front of it for KeepAlive and static files, which reduces RAM and CPU usage drastically. And it also makes everything faster for website visitors. There's nothing wrong using both Apache and nginx, each has its purpose.
- gnaritas 13y ago> I looked at WordPress code and I don't recall seeing any thread stuff being used at all. You misunderstand. You don't need to write threaded code to write code that can't be used in a threaded environment. Think about using and accessing global or static variables in a threaded host environment vs a prefork process based environment. PHP devs have adopted the practice of using Apache pre-fork rather than simply fixing their bad code because it hides their mistakes. On top of that, Wordpress being a huge plugin based community, you get tons of poorly written plugins that assume they're running in a single process environment because the authors simply don't know any better. As far as I can tell, most PHP devs seem to think Apache only has a pre-fork mode; they write lengthy articles about how bad Apache is on memory not realizing the only reason it's that bad is because they're using the oldest and most resource hungry worker mpm. They don't seem to be aware Apache has other worker modules like threaded and evented that don't suck down ram like the prefork model does.