Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is Magento thread-safe?

Is anyone using Magento with Apache worker MPM?

I've read conflicting reports of stability and security using worker instead of prefork, but have also read that worker is much faster than prefork.

like image 208
dbcn Avatar asked May 26 '11 13:05

dbcn


1 Answers

PHP5 is thread-safe, but PHP extensions aren't all thread-safe. So it's considered harmfull to run a PHP application on a worker-mpm. And Magento is a PHP application like any other, chances are that you are using some PHP extensions somewhere (GD, Xml, etc) and that you can't test it for thread stability (really hard to test).

But what you can do is use apache as worker (really a lot more HTTP request handled, very useful for all static files), and push PHP out of Apache (so with no mod_php).

For that you will have to use PHP with fcgid or php-fpm, that is modern version of cgi to say it in a few words.

like image 180
regilero Avatar answered Nov 12 '22 04:11

regilero