PHP CGI Wrapper vs FCGId issues

Hi,

I’m new to VirtualMin and the VPS thing so I’m sure I’m missing something somewhere.

I’m running Apache, Varnish and (currently) PHP in CGI Wrapper mode.

For some reason, switching to FCGId has my 1G Ram VPS consuming more than double the Ram continuously so there’s certainly something wrong somewhere.

Here’s my currently enabled Apache modules - http://i904.photobucket.com/albums/ac244/Rastarr/Shades_zps8f49f01a.jpg

I’m wondering what I’ve enabled that isn’t needed and whether the enabled modules are conflicting with FCGId in some way to cause the memory usage?

Any help in tuning Apache, ridding unneccessary modules and getting FCGId up and running would be appreciated. As I said, I’m new to this SysAdmin thing :slight_smile:

Cheers
Martin

Howdy,

Hmm, FCGID would indeed use more RAM than CGI, but it would surprise me if it were using double. I suppose I’m wondering if maybe there’s another explanation for what you’re seeing…

That said, it’s always good to get rid of things you don’t need, so removing Apache modules you aren’t using, as well as services you don’t need, is fantastic.

From the list you showed – this all depends on what you’re using, but on my system, I disable the php5 module (which is only needed for mod_php, and uses a lot of RAM), ruby, and all the proxy modules.

My other thought at the moment, is do you really want FCGID if you’re also using Varnish? I wasn’t sure how much of a performance increase you’d see using FCGID over CGI in that case.

-Eric

Are you saying that running in CGI mode that mod_php5 isn’t required then?
Sorry, I’m yet to fully understand what every module is being used for, though I am Googling as I go along:)

I guess what I’m also asking is what Apache modules or other dependencies are required for CGI wrapper mode?
If this is working for me fine at the moment, then I’ll look at disabling mod_fcgid and anything else I don’t need.

Are you saying that running in CGI mode that mod_php5 isn’t required then?

Yup, that’s correct. The mod_php Apache module is only needed when using mod_php as your PHP Execution Mode. The CGI mode requires the “cgi” module, and FCGID mode requires the “fcgid” module.

I guess what I’m also asking is what Apache modules or other dependencies are required for CGI wrapper mode?

The CGI PHP Execution Mode requires the “cgi” Apache module in order to function properly.

-Eric

Thanks for your help via IRC today, andreychek - very much appreciated.

I initially wasn’t able to restart Apache because of the virtual host conf files containing references to various modules that I wanted to remove hence my initial confusion.

I suppose Apache/Virtualmin removes the references from apache2.conf but not from the virtual hosts.

All is good now and I’ve even managed to tune mySQL down thanks to mysqltuner.pl
Much better running system all around
Martin