tolouei

Member
May 17, 2008
10
0
51
Hi

I have a xeon conroe dual core server with 4gb ram running whm/cpanel 11, with apache 2.2.8 and the last php verson, cgi, perl.

In this server is running a high traffic and processing site, with php + mysql and perl forum (yabb).

My question is: is better to use apache with Worker or Prefork mpm?

I read about using worker with php and perl and its not recomended, because is unstable. Is it true?

Thanks a lot
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
Hi

I have a xeon conroe dual core server with 4gb ram running whm/cpanel 11, with apache 2.2.8 and the last php verson, cgi, perl.

In this server is running a high traffic and processing site, with php + mysql and perl forum (yabb).

My question is: is better to use apache with Worker or Prefork mpm?

I read about using worker with php and perl and its not recomended, because is unstable. Is it true?

Thanks a lot
The Worker MPM uses threads. Some (many?) PHP extensions are not thread-safe and cannot be used.

The recommendation when using mod_php is to use the Prefork MPM.

If you are not using mod_php, for example using mod_suphp, or FastCGI to server PHP content, then Worker should be fine.
 
Last edited:

tolouei

Member
May 17, 2008
10
0
51
The Worker MPM uses threads. Some (many?) PHP extensions are not thread-safe and cannot be used.

The recommendation when using mod_php is to use the Preform MPM.

If you are not using mod_php, for example using mod_suphp, or FastCGI to server PHP content, then Worker should be fine.

Hi,

But, what is the faster/the best solution? In pick usage, I have more than 500 simultan conections...

Thanks
 

rkm11

Active Member
May 30, 2007
31
0
156
I use Prefork. I think he recommended that above.

Are you experiencing problems?
 

VeZoZ

Well-Known Member
Dec 14, 2002
245
0
166
cPanel Access Level
DataCenter Provider
The Worker MPM uses threads. Some (many?) PHP extensions are not thread-safe and cannot be used.

The recommendation when using mod_php is to use the Preform MPM.

If you are not using mod_php, for example using mod_suphp, or FastCGI to server PHP content, then Worker should be fine.
Interesting

I thought mod_suphp would run fine with worker, however I had several boxes end up with PHP processes that never died out. I thought maybe it was worker causing it but I am not to sure about that one.

Of course with worker it was super stable when it came to httpd requests that thing never failed on a request. Prefork on the other hand I'd say once a day I got at least one notice from a monitoring service (Run 3 of them all 1 minute monitoring) saying something failed a request.

I wish I could have figured out what was causing the PHP processes to hang (no cpu just ram). But not much an expert with regards to debugging that sort of stuff.
 

HostIgnition

Registered
Oct 19, 2003
4
0
151
We noticed the same issue and end up going back to prefork for more stable httpd. However, CPU usage definitely get much higher due to much higher rate of spawning process.

Definitely worker + mod_suphp will give much faster response for httpd but memory leak and php process hang may cause server to hang due to too much memory consumption over time.
 

VeZoZ

Well-Known Member
Dec 14, 2002
245
0
166
cPanel Access Level
DataCenter Provider
Well prefork has this issue as well I noticed, however you may only see maybe one show up over the course of a day or two opposed to worker where you leave it 12 hours and you could have 20 php processes just sitting there.