Apache and worker

Issues related to software problems.
Post Reply
vash23
Posts: 2
Joined: 2007/05/18 08:46:32

Apache and worker

Post by vash23 » 2007/05/18 08:54:40

Hi to All, this is my first post on centos ,I use this distro at work on all my server and for now I'm a newbie but I want to learn more.
Now I fight with apache and his optimization, and I want to know why in centos server cd 4.x is compiled against prefork.c and not worker.c . I study that the
worker is a new method and it is better then prefork.
Tankyou for all reply
Ps: Sorry for my english

RemiFedora
Posts: 19
Joined: 2007/05/10 17:13:40
Location: Champagne...
Contact:

Re: Apache and worker

Post by RemiFedora » 2007/05/18 09:30:07

Worker use thread.

So, if you want to install an extension, this must be "threadsafe".

For exemple; read [url=http://fr2.php.net/manual/en/faq.installation.php#faq.installation.apache2]Why shouldn't I use Apache2 with a threaded MPM in a production environment?[/url] (from PHP documentation).

So using prefork is a good workaround against non (certified) threadsafe extension.

Remi.

vash23
Posts: 2
Joined: 2007/05/18 08:46:32

Re: Apache and worker

Post by vash23 » 2007/05/18 10:01:53

tankyou so much, so and if i use fastcgi?

ramos
Posts: 16
Joined: 2006/01/19 23:47:56
Contact:

Apache and worker

Post by ramos » 2007/05/18 18:57:54

Threading PHP on Linux is going to be slower and introduce all manner of weird bugs, even when using fastcgi. It will work fine until you have to go outside PHP and grab something off a filesystem, or spawn a child process to return something, at which point it will basically break with no informative error. You'll also run into problems with non-threadsafe libraries linked into PHP.

All you'll get from threading is a decrease in memory usage. It's not going to be any faster.

Post Reply

Return to “CentOS 5 - Software Support”