[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

fastcgi too slow in debian squeeze



Dear list,

I have been suffering with the slow performance of my apache server (2.2.16) running
on debian wheezy. I have finally pointed out it is the fastcgi which makes the web server
so slow. But I really need it as I am also hosting some sites which do require php 5.2

The symptoms of having the fastcgi is very annoying.

-1 All sites need 30 or so sec. to open and after that the browsing is again normal for that site.
-2 Sites having fastcgi enabled is frequently facing "Internal Server Error" and through log I can see


`````````````````
terminated due to uncaught signal '15' (Terminated)

[warn] FastCGI: (dynamic) server "/usr/lib/cgi-bin/php52/php52.fcgi" started

[warn] FastCGI: (dynamic) server "/usr/lib/cgi-bin/php52/php52.fcgi" (pid 1971) terminated by calling exit with status '0'
[warn] FastCGI: (dynamic) server "/usr/lib/cgi-bin/php52/php52.fcgi" restarted (pid 2019)
[warn] FastCGI: (dynamic) server "/usr/lib/cgi-bin/php52/php52.fcgi" (pid 2019) termination signaled
[warn] FastCGI: (dynamic) server "/usr/lib/cgi-bin/php52/php52.fcgi" (pid 2019) terminated by calling exit with status '0'
[warn] FastCGI: (dynamic) server "/usr/lib/cgi-bin/php52/php52.fcgi" restarted (pid 6117)
[warn]  FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php52/php52.fcgi"

`````````````````

The usr/lib/cgi-bin/php52/php52.fcgi is

```````````````````````
#!/bin/sh
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=200
export PHP_FCGI_MAX_REQUESTS
#export PHPRC="/usr/local/bin/php5.2/etc/php.ini"
exec /usr/local/bin/php5.2/bin/php-cgi
```````````````````

Apache modules enabled

```````````````
actions alias auth_basic auth_digest authn_alias authn_file authz_default authz_groupfile authz_host authz_owner 
authz_user autoindex cache cgi dav dav_fs dav_svn dbd deflate dir env expires fastcgi file_cache mime mod-security php5 reqtimeout 
rewrite setenvif ssl suexec unique_id version vhost_alias
````````````````

I have also modified  /etc/apache2/mods-enabled/fastcgi.conf as

````````````````
<IfModule mod_fastcgi.c>
  AddHandler fastcgi-script .fcgi
  #FastCgiWrapper /usr/lib/apache2/suexec
  FastCgiIpcDir /var/lib/apache2/fastcgi

### modification######
FastCgiConfig \
-idle-timeout 60 \
-singleThreshold 50 \
-maxClassProcesses 50
### end mod ##########

</IfModule>
```````````````````````````

Could any one please suggest how can I get rid off #1 and #2 ?

Thanks


Reply to: