Gzip_static & fascgi

Hi,

I help me google for translation, and yes, always french:)

I use the module “gzip” with a level 9, as some files are compiled php
700 KB, and they rarely change, and are types:

/page/fiche_produit.php?id_prod=221 (643.80 Kbytes according xcache)
/page/fiche_produit.php?id_prod=227 //

I am therefore interested in the module “gzip_static” I have half a
place like this:

location ^~ /page/ {
gzip on;
gzip_static on;
gzip_comp_level 9;
gzip_http_version 1.1;
gzip_min_length 2500;
gzip_proxied any;
gzip_types text/plain text/html text/xml text/css
application/x-javascript application/xml application/rss+xml
application/atom+xml;
gzip_disable “MSIE [1-6].”;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME
/data/www/sites/viya$fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi.conf;}

But how this unit works?

The idea that I, gzip to level 9 manufactures a gz for every
application, and then are kept so that “gzip_static” use?

Or, we should be making gz each php files, so that they are taken into
account by “gzip_static”, but, no interest, because the php script
changes with the parameters (fiche_produit.php?Id_prod = 221/222/etc).

Is there another solution cache otherwise, to reduce the size of a file
php (poorly programmed :slight_smile: and not zipped to every request.

I have another question:

I installed php 4.4.8 mode fpm, but I find it difficult to set the
parameter: “value = name” max_requests "equals PHP_FCGI_MAX_REQUESTS.
On the Internet, some up to 5000 or even 10 000, others talk about
memory leaks, and starts to 100 250.
What do you think?

Sorry for “my” English.

Guillaume.

As far as fcgi requests I think I set mine to 250.

I believe gzip_static only works for static content. From what I
understand it simply checks if file.gz exists. The idea is to
precompress the files yourself ahead of time. But I could be wrong.

On Fri, Jul 25, 2008 at 04:25:51AM +0200, Mikel Arteta wrote:

I help me google for translation, and yes, always french:)

After two years my son will start to learn French in a scholl,
so I have to learn it too :slight_smile:

gzip  on;
fastcgi_param  SCRIPT_FILENAME

changes with the parameters (fiche_produit.php?Id_prod = 221/222/etc).

Is there another solution cache otherwise, to reduce the size of a file
php (poorly programmed :slight_smile: and not zipped to every request.

No, gzip_static does not work in this way.
However, I’m going to add caching capabilities to fastcgi and gzip.

I have another question:

I installed php 4.4.8 mode fpm, but I find it difficult to set the
parameter: “value = name” max_requests "equals PHP_FCGI_MAX_REQUESTS.
On the Internet, some up to 5000 or even 10 000, others talk about
memory leaks, and starts to 100 250.
What do you think?

I think it depends on PHP code. However, I do not use PHP and can not
say.

Hello (bonjour :slight_smile: ),

mike a écrit :

I believe gzip_static only works for static content. From what I
understand it simply checks if file.gz exists. The idea is to
precompress the files yourself ahead of time. But I could be wrong.

A workaround would be to use some url rewriting :
/page/fiche_produit_xxx.html => /page/fiche_produit.php?id_prod=xxx

So you can pregenerate your fiche_produit_xxx.html.gz files.

you can use php’s gzip support to compress the output or (better) just
tell nginx to do gzip on the fly. that’s how i have mine configured.
everything is gzipped after it’s been returned from fastcgi
processing…

On Fri, 25 Jul 2008 04:25:51 +0200, Mikel Arteta wrote:

Hi,

I help me google for translation, and yes, always french:)

I use the module “gzip” with a level 9, as some files are compiled php
700 KB, and they rarely change, and are types:

/page/fiche_produit.php?id_prod=221 (643.80 Kbytes according xcache)
/page/fiche_produit.php?id_prod=227 //
Sorry, no docs, but you may be interested in the OpenHack memcached_gzip
module (see http://fortress-managed.net/git/nginx-patched for my mirror,
or http://openhack.ru/nginx-patched for the original site)

Igor S. wrote:

After two years my son will start to learn French in a scholl,
so I have to learn it too :slight_smile:
The french in general are ill with languages :slight_smile:

However, I’m going to add caching capabilities to fastcgi and gzip.
Awesome.

Bryon Roche wrote:

Sorry, no docs, but you may be interested in the OpenHack memcached_gzip
module (see http://fortress-managed.net/git/nginx-patched for my mirror,
or http://openhack.ru/nginx-patched for the original site)
This module zips up dynamically generated in memory ? , Or should it
create gzip and place them in memcached ?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs