Mod_fastcgi or mod_fcgi, whats your expirience?

Hi RT Users,

who is using mod_fastcgi and who mod_fcgi? Can me tell someone the pros and
cons? We are still using mod_fastcgi and we have a lot of problems. Did some
have a good configuration example for both??

MFG

Torsten Brumm

http://www.torsten-brumm.de

who is using mod_fastcgi and who mod_fcgi? Can me tell someone the
pros and cons? We are still using mod_fastcgi and we have a lot of
problems. Did some have a good configuration example for both??

What does “lot of problems” mean? Perhaps if you described the
symptoms we could help fix the cause…

I use mod_fastcgi on FreeBSD 6.1 with Apache 2.0, perl 5.8.8, SSL
enabled. i have to do an apache reload (graceful restart) once per
night to force it to restart the fastcgi processes as they seem to
memory bloat and we process a lot of tickets. I’d love it if they
had the equivalent of Apache::SizeLimit from mod_perl…

RT3 FastCGI

<Directory “/usr/local/rt3”>
AllowOverride None
Order allow,deny
Allow from all

set idle timeout a bit longer than RT’s idle timeout.

FastCgiServer /usr/local/rt3/bin/mason_handler.fcgi -processes 8 -
idle-timeout 305

<VirtualHost *:443>
ServerName www.example.com
DocumentRoot “/usr/local/rt3/share/html”
AddDefaultCharset UTF-8
ErrorLog /var/log/httpd-rt-error.log
CustomLog /var/log/httpd-rt-access.log combined
AddHandler fastcgi-script fcgi

 Alias /NoAuth/images /usr/local/rt3/share/html/NoAuth/images
 Alias / /usr/local/rt3/bin/mason_handler.fcgi/

 SSLEngine on
 SSLCipherSuite ALL:!ADH:!EXPORT56:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:- 

LOW:+EXP:+eNULL

 SSLCertificateFile /usr/local/etc/apache2/ssl.crt/ 

www.example.com.crt
SSLCertificateKeyFile /usr/local/etc/apache2/ssl.key/
www.example.com.key
<Files ~ “.(cgi|shtml|phtml|php3?)$”>
SSLOptions +StdEnvVars

SetEnvIf User-Agent “.MSIE.
nokeepalive ssl-unclean-shutdown
downgrade-1.0 force-response-1.0

smime.p7s (2.47 KB)

Hi RT Users,

who is using mod_fastcgi and who mod_fcgi? Can me tell someone the pros
and cons? We are still using mod_fastcgi and we have a lot of problems. Did
some have a good configuration example for both??

mod_fastcgi is for apache 1. If you are using apache 2, then you should
use mod_fcgid, since it is under active dev, and is much more stable ( under
apache2 )

Chorg Heavy Industries wrote:

Hi RT Users,

who is using mod_fastcgi and who mod_fcgi? Can me tell someone the
pros and cons? We are still using mod_fastcgi and we have a lot of
problems. Did some have a good configuration example for both?? 

mod_fastcgi is for apache 1. If you are using apache 2, then you
should use mod_fcgid, since it is under active dev, and is much more
stable ( under apache2 )

For what it’s worth, we’ve used mod_fastcgi with apache2 and been quite
happy with it.

signature.asc (189 Bytes)

mod_fastcgi is for apache 1. If you are using apache 2, then you
should use mod_fcgid, since it is under active dev, and is much
more stable ( under apache2 )

mod_fastcgi is also part of apache 2.0. I haven’t checked 2.2.
works just fine.

smime.p7s (2.47 KB)

Hi Vivek,

the problems are like this:

  1. We started 20 fastcgi processes, the idle timeout is like yours, so far
    so fine, but our installation is splitted to www → db server on different
    systems. after the idle timeout, the processes are not reconnecting again.

  2. The fast_cgi processes performing under heavy load (6000-9000 concurrent
    user) absolutly bad. We have enough memory at the www box, enough cpu power
    but the processes are slow really slow.

After this, we switched yesterday to mod_fcgid and from my feeling it is
better, the negativ part here…they using more memory…argh.

Our fast_cgi config:

LoadModule fastcgi_module /usr/lib/httpd/modules/mod_fastcgi.so

FastCgiServer /opt/rt3/bin/mason_handler.fcgi -idle-timeout 1200 -processes
20 -listen-queue-depth 300 -priority 9 -appConnTimeout 305

<VirtualHost *>
ServerName ticket.int.kn
ServerAdmin hubsupport@kuehne-nagel.com
DocumentRoot /opt/rt3/share/html
AddHandler fastcgi-script .fcgi
ExpiresActive On
ExpiresByType text/css A3600
ExpiresByType image/png A3600
ExpiresByType application/x-javascript A3600
ExpiresByType image/gif A3600
Alias /NoAuth/images/ /opt/rt3/share/html/NoAuth/images/
Alias /pics/ /opt/rt3/share/html/NoAuth/images/pics/
ScriptAlias / /opt/rt3/bin/mason_handler.fcgi/

Btw. @Vivek. You wrote in another Post about performance “boost” with some
new indexes, but i can find this., can you repost it or sent?

Thanks2007/1/24, Vivek Khera vivek@khera.org:

On Jan 23, 2007, at 8:47 AM, Torsten Brumm wrote:

who is using mod_fastcgi and who mod_fcgi? Can me tell someone the pros
and cons? We are still using mod_fastcgi and we have a lot of problems. Did
some have a good configuration example for both??

What does “lot of problems” mean? Perhaps if you described the symptoms
we could help fix the cause…

I use mod_fastcgi on FreeBSD 6.1 with Apache 2.0, perl 5.8.8, SSL
enabled. i have to do an apache reload (graceful restart) once per night to
force it to restart the fastcgi processes as they seem to memory bloat and
we process a lot of tickets. I’d love it if they had the equivalent of
Apache::SizeLimit from mod_perl…

RT3 FastCGI

<Directory “/usr/local/rt3”>
AllowOverride None
Order allow,deny
Allow from all

set idle timeout a bit longer than RT’s idle timeout.

FastCgiServer /usr/local/rt3/bin/mason_handler.fcgi -processes 8
-idle-timeout 305

<VirtualHost *:443>
ServerName www.example.com
DocumentRoot “/usr/local/rt3/share/html”
AddDefaultCharset UTF-8
ErrorLog /var/log/httpd-rt-error.log
CustomLog /var/log/httpd-rt-access.log combined
AddHandler fastcgi-script fcgi

Alias /NoAuth/images /usr/local/rt3/share/html/NoAuth/images
Alias / /usr/local/rt3/bin/mason_handler.fcgi/

SSLEngine on
SSLCipherSuite

ALL:!ADH:!EXPORT56:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:-LOW:+EXP:+eNULL

SSLCertificateFile /usr/local/etc/apache2/ssl.crt/www.example.com.crt
SSLCertificateKeyFile /usr/local/etc/apache2/ssl.key/

www.example.com.key
<Files ~ “.(cgi|shtml|phtml|php3?)$”>
SSLOptions +StdEnvVars

SetEnvIf User-Agent “.MSIE.
nokeepalive ssl-unclean-shutdown
downgrade-1.0 force-response-1.0


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

MFG

Torsten Brumm

http://www.torsten-brumm.de

The FastCGI protocol needs to die. It is very cumbersome and
difficult to implement efficiently, and the C libraries for it are,
shall we say, difficult to modernize. Lately I’ve been recoding our
large projects to use the new SCGI protocol. The speedup and
reliability and ease of implementation have dramatically improved.

Btw. @Vivek. You wrote in another Post about performance “boost”
with some new indexes, but i can find this., can you repost it or
sent?

These were for Postgres for RT 3.2, but seem to still apply to 3.6.
The stock indexes that come with RT are basically unused due to how
querybuilder makes queries.

rt321index.sql (1.92 KB)

smime.p7s (2.47 KB)

Thanks Vivek,

will try it out.

Torsten2007/1/29, Vivek Khera vivek@khera.org:

On Jan 29, 2007, at 6:08 AM, Torsten Brumm wrote:

The FastCGI protocol needs to die. It is very cumbersome and difficult to
implement efficiently, and the C libraries for it are, shall we say,
difficult to modernize. Lately I’ve been recoding our large projects to use
the new SCGI protocol. The speedup and reliability and ease of
implementation have dramatically improved.

Btw. @Vivek. You wrote in another Post about performance “boost” with some
new indexes, but i can find this., can you repost it or sent?

These were for Postgres for RT 3.2, but seem to still apply to 3.6. The
stock indexes that come with RT are basically unused due to how querybuilder
makes queries.


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

MFG

Torsten Brumm

http://www.torsten-brumm.de

Hi Vivek,

do you have some configuration information for SCGI and RT and Apache?

Would be great to get some hints.

Torsten2007/1/29, Vivek Khera vivek@khera.org:

On Jan 29, 2007, at 6:08 AM, Torsten Brumm wrote:

The FastCGI protocol needs to die. It is very cumbersome and difficult to
implement efficiently, and the C libraries for it are, shall we say,
difficult to modernize. Lately I’ve been recoding our large projects to use
the new SCGI protocol. The speedup and reliability and ease of
implementation have dramatically improved.

Btw. @Vivek. You wrote in another Post about performance “boost” with some
new indexes, but i can find this., can you repost it or sent?

These were for Postgres for RT 3.2, but seem to still apply to 3.6. The
stock indexes that come with RT are basically unused due to how querybuilder
makes queries.


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

MFG

Torsten Brumm

http://www.torsten-brumm.de

do you have some configuration information for SCGI and RT and Apache?

I just use FastCGI as it is well documented :wink:

SpeedyCGI didn’t pan out for me even though there is support in RT.

I’ve not tried SCGI for RT but we use it for our own internal projects.