2010年4月30日星期五

Re: "worker process XXXXX exited on signal 11" following freeBSD -> Ubuntu migration

Hello!

On Fri, Apr 30, 2010 at 03:22:20AM -0400, DaleMcGrew wrote:

> Any advice on tracking down the cause of "worker process XXXXX
> exited on signal 11" errors? Thank you in advance for your help.
>
> We have been running NGINX 0.7.65 on freeBSD for a few months.
> Because of issues getting the fail-over to work properly, 1 week
> ago we migrated from freeBSD to Linux (Ubuntu) running version
> 0.7.65. In this first week, we saw perhaps 2 dozen "worker
> process XXXXX exited on signal 11" errors per hour and have been
> experiencing dropped web connections at a rate that seems to
> coincide with the "exited on signal 11" errors. We tried many
> different configuration changes, and finally this afternoon
> upgraded to 0.8.36. Unfortunately we continue to see the "worker
> process XXXXX exited on signal 11" errors.

Could you please show nginx -V output, and obtain coredump and
show backtrace? Configuring something like this in nginx.conf
should be enough to obtain one even in Linux:

working_directory /path/to/cores;
worker_rlimit_core 500M;

Note that nginx workers should be able to write to /path/to/cores
directory.

Also please make sure you have no third party modules/patches
compiled in (and/or reproduce the problem without them, if any).

[...]

> location / {
> proxy_pass http://php5$request_uri;

Just curious: why do you use this form instead of

proxy_pass http://php5;

?

[...]

> # Add expires headers
> location ~* ^.+\.(js)$ {

Just a note: there is no need to use "^.+". And brackets just
produce capture which is not used. The following string will do
the same with less cpu burn:

location ~* \.js$ {

[...]

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Load Balanced Servers Active Connections Increasing

We are using a hardware load balancer between two Nginx 0.8.4 servers streaming mp4 videos. The Stub Status plugin shows active connections continuously increasing and never going down. Is any one else having this problem and are there any patches or fixes to this?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,81223,81223#msg-81223


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: "worker process XXXXX exited on signal 11" following freeBSD -> Ubuntu migration

[root@lb01 ~]# /usr/local/nginx/sbin/nginx -v
nginx version: nginx/0.8.36

[root@lb01 ~]# uname -a
Linux lb01.golightly.com 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,80720,81208#msg-81208


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: Thin client server using FreeNX

On Fri, Apr 30, 2010 at 6:50 PM, niraj.kumar <nginx-forum@nginx.us> wrote:
>                                 So please suggest and

try asking in centos/linux forum

> if it can then kindly suggest link to configure thin client server and
> client with FreeNX.
>

http://wiki.centos.org/HowTos/FreeNX


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Monitor nginx server status / connections / requests

Hi

Now that i have nginx up and running and i am seeing lots of connections on it, i would like to know what sorts of programs you use to monitor nginx status and what sorts of requests its handling. Like apache has server-status feature, so what are nginx options regarding monitoring whats going on and whats eating how much bandwidth. I am not talking to watching log files, more like snapshots, like apache has.

Terveisin/Regards,
  Pekka Panula, Sofor Oy - Jatkuvat palvelut

Thin client server using FreeNX

Hi all,

I want to configure a thing client server with FreeNX on Centos5.4 that can be accessed from thin client system having no Disk or O/S can access application from thin client server. So i want to know how much FreeNX successful for it and how many clients can access an application from thin client server simultaneously at a time if i have server with high configuration
like [b]HPDL385 G2 Server with 16 GB RAM[/b]. Is it compatible for 50-70 users work at a time.
So please suggest and if it can then kindly suggest link to configure thin client server and
client with FreeNX.


Thanks,
Niraj

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,80721,80721#msg-80721


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: "worker process XXXXX exited on signal 11" following freeBSD -> Ubuntu migration

On Fri, Apr 30, 2010 at 03:22:20AM -0400, DaleMcGrew wrote:
> Any advice on tracking down the cause of "worker process XXXXX exited on signal 11" errors? Thank you in advance for your help.
>
> We have been running NGINX 0.7.65 on freeBSD for a few months. Because of issues getting the fail-over to work properly, 1 week ago we migrated from freeBSD to Linux (Ubuntu) running version 0.7.65. In this first week, we saw perhaps 2 dozen "worker process XXXXX exited on signal 11" errors per hour and have been experiencing dropped web connections at a rate that seems to coincide with the "exited on signal 11" errors. We tried many different configuration changes, and finally this afternoon upgraded to 0.8.36. Unfortunately we continue to see the "worker process XXXXX exited on signal 11" errors.
>
> Other possible factors: We have been using keepalived to verify that NGINX is accepting web traffic on port 80 every second.
>
> This is our configuration file:
> [code]
...
> [/code]

Could you provide

$ nginx -v
$ uname -a

--
Sergey A. Osokin,
osa@FreeBSD.ORG
osa@FreeBSD.ORG.ru

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

"worker process XXXXX exited on signal 11" following freeBSD -> Ubuntu migration

Any advice on tracking down the cause of "worker process XXXXX exited on signal 11" errors? Thank you in advance for your help.

We have been running NGINX 0.7.65 on freeBSD for a few months. Because of issues getting the fail-over to work properly, 1 week ago we migrated from freeBSD to Linux (Ubuntu) running version 0.7.65. In this first week, we saw perhaps 2 dozen "worker process XXXXX exited on signal 11" errors per hour and have been experiencing dropped web connections at a rate that seems to coincide with the "exited on signal 11" errors. We tried many different configuration changes, and finally this afternoon upgraded to 0.8.36. Unfortunately we continue to see the "worker process XXXXX exited on signal 11" errors.

Other possible factors: We have been using keepalived to verify that NGINX is accepting web traffic on port 80 every second.

This is our configuration file:
[code]
# Nginx configuration file
user nobody;
worker_processes 1;

events {
worker_connections 1024;
}

http {

gzip on;
gzip_types text/plain text/css application/x-javascript application/javascript;
gzip_disable "MSIE [1-6]\.";

# This controls upload size
client_max_body_size 45M;

# How long to wait for upstream server response (seconds)
proxy_read_timeout 600;

upstream php5 {
server 192.168.1.121 weight=1;
server 192.168.1.123 weight=1;
}


# keeps connection to same web servers
upstream webserversessions {
ip_hash;
server 192.168.1.121;
server 192.168.1.123;
}

## Default for all sites
server {
listen 80;
location / {
proxy_pass http://php5$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-By $server_name;
}

# Add expires headers
location ~* ^.+\.(js)$ {
expires modified +24h;
proxy_pass http://php5$request_uri;
}

# Stats reporting
location /nginx_status {
stub_status on;
access_log off;
allow 192.168.234.0/24;
allow 192.168.1.0/24;
deny all;
}
}

## maintain session required for openID
server {
listen 80;
server_name community.llli.org;
location / {
proxy_pass http://webserversessions$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

## For site that needs sessions
server {
listen 80;
server_name files.golightly.com;
location / {
proxy_pass http://webserversessions$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-By $server_name;
}
}

## SSL sites ##

server { # Need to add this server section with unique IP for each SSL site we serve
listen 38.127.224.114:443;
ssl on;
ssl_certificate /etc/ssl/www.latchon.org.pem;
ssl_certificate_key /etc/ssl/private/www.latchon.org.key;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;

location / {
proxy_pass http://php5$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-By $server_name:443;
}
}

server {
listen 38.127.224.112:443;
ssl on;
ssl_certificate /etc/ssl/networking.cccu.org.pem;
ssl_certificate_key /etc/ssl/private/networking.cccu.org.key;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;

location / {
proxy_pass http://php5$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-By $server_name:443;
}
}

server {
listen 38.127.224.113:443;
ssl on;
ssl_certificate /etc/ssl/backstage.codenomicon.com.chain.pem;
ssl_certificate_key /etc/ssl/private/backstage.codenomicon.com.key;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;

location / {
proxy_pass http://php5$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-By $server_name:443;
}
}

}
[/code]

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,80720,80720#msg-80720


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

2010年4月29日星期四

Re: Nginx Terminates at 71.6 kilobytes

On Tue, Apr 27, 2010 at 6:47 PM, Shahan Khan <contact@shahan.me> wrote:
Maybe a nginx feature that should be added is when the temporary cache
directory runs out of space, nginx disable the proxy cache buffer and also
disables gzip encoding.

I personally disagree, it's quite normal (if not expected!) for software to stop working upon disk fill-up, and trying to recover smartly from this (and then maybe a few million other issues) would make it more complex, less mantainable and slower.

+1 for returning a 500 instead, and logging the error as critical if it doesn't already.

Bye 

Re: defining uint64_t, etc., during configure

On Thursday, 29.04.10 at 18:39, Igor Sysoev wrote:
> > checking for off_t size ... 4 bytes
>
> Does SCO support files >2G ?

I think it does not.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

On Thu, Apr 29, 2010 at 10:06:58AM -0400, Brian Lewis wrote:

> On Thursday, 29.04.10 at 17:58, Igor Sysoev wrote:
> > BTW, if the patch will resolve the issue, could you please post full
> > ./configure ouput ?
>
> Output of
> ./configure --without-http_rewrite_module --without-http-cache
> :
>
> checking for OS
> + SCO_SV 3.2 i386

> checking for off_t size ... 4 bytes

Does SCO support files >2G ?


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

On Thursday, 29.04.10 at 17:58, Igor Sysoev wrote:
> BTW, if the patch will resolve the issue, could you please post full
> ./configure ouput ?

Output of
./configure --without-http_rewrite_module --without-http-cache
:

checking for OS
+ SCO_SV 3.2 i386
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 3.3.1
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... not found
checking for gcc variadic macros ... found
checking for C99 variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... not found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for sys/bitypes.h ... found
checking for crypt.h ... found
checking for SCO_SV specific features
checking for nobody group ... not found
checking for nogroup group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... not found
checking for O_DIRECT ... not found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... not found
checking for statvfs() ... found
checking for dlopen() ... found
checking for sched_yield() ... found
checking for zlib library ... found
creating objs/Makefile
checking for int size ... 4 bytes
checking for long size ... 4 bytes
checking for long long size ... 8 bytes
checking for void * size ... 4 bytes
checking for int64_t ... int64_t not found, long long used
checking for uint64_t ... uint64_t not found u_int64_t not found, unsigned long long used
checking for int32_t ... found
checking for uint32_t ... uint32_t not found, u_int32_t used
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... socklen_t not found, int used
checking for in_addr_t ... in_addr_t not found uint32_t not found, u_int32_t used
checking for in_port_t ... in_port_t not found, u_short used
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t not found , uint32_t used
checking for system endianess ... little endianess
checking for size_t size ... 4 bytes
checking for off_t size ... 4 bytes
checking for time_t size ... 4 bytes
checking for setproctitle() ... not found
checking for pread() ... not found
checking for pwrite() ... not found
checking for strerror_r() ... not found
checking for gnu style strerror_r() ... not found
checking for sys_errlist[] ... not found
checking for localtime_r() ... found
checking for posix_memalign() ... not found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... not found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for System V shared memory ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... not found
checking for struct tm.tm_gmtoff ... not found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... not found

Configuration summary
+ PCRE library is not used
+ OpenSSL library is not used
+ md5 library is not used
+ sha1 library is not used
+ using system zlib library

nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

On Thursday, 29.04.10 at 17:55, Igor Sysoev wrote:
> Well, here is a new patch.

Thank you. That patch allows ./configure to complete.

make produces
src/core/ngx_string.c: In function `ngx_vslprintf':
src/core/ngx_string.c:275: warning: `ngx_pid_t' is promoted to `int' when passed through `...'
src/core/ngx_string.c:275: warning: (so you should pass `int' not `ngx_pid_t' to `va_arg')
make[1]: *** [objs/src/core/ngx_string.o] Error 1

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

On Thu, Apr 29, 2010 at 05:55:27PM +0400, Igor Sysoev wrote:

> On Thu, Apr 29, 2010 at 09:46:00AM -0400, Brian Lewis wrote:
>
> > On Thursday, 29.04.10 at 10:30, Igor Sysoev wrote:
> > > On Wed, Apr 28, 2010 at 04:07:57PM -0400, Brian Lewis wrote:
> > > > checking for in_addr_t ... in_addr_t not found uint32_t not found
> > > > ./configure: error: can not define in_addr_t
> > >
> > > What is in objs/autoconf.err after
> > > checking for sys/bitypes.h
> > > ?
> >
> > There are no errors in that section. <sys/bitypes.h> defines u_int32_t,
> > though.
>
> Well, here is a new patch.

BTW, if the patch will resolve the issue, could you please post full
./configure ouput ?


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

Index: src/os/unix/ngx_posix_config.h
===================================================================
--- src/os/unix/ngx_posix_config.h (revision 2825)
+++ src/os/unix/ngx_posix_config.h (working copy)
@@ -33,6 +33,9 @@
#if (NGX_HAVE_INTTYPES_H)
#include <inttypes.h>
#endif
+#if (NGX_HAVE_SYS_BITYPES_H)
+#include <sys/bitypes.h>
+#endif
#include <stdarg.h>
#include <stddef.h> /* offsetof() */
#include <stdio.h>
Index: auto/unix
===================================================================
--- auto/unix (revision 2825)
+++ auto/unix (working copy)
@@ -30,15 +30,22 @@
;;
esac

-ngx_type="uint64_t"; ngx_types="u_int64_t"; . auto/types/typedef
+ngx_type="int64_t"; ngx_types="long long"; . auto/types/typedef

+ngx_type="uint64_t"; ngx_types="u_int64_t:unsigned long long"
+. auto/types/typedef
+
+ngx_type="int32_t"; ngx_types="int"; . auto/types/typedef
+
+ngx_type="uint32_t"; ngx_types="u_int32_t:unsigned int"; . auto/types/typedef
+
ngx_type="sig_atomic_t"; ngx_types="int"; . auto/types/typedef
. auto/types/sizeof
ngx_param=NGX_SIG_ATOMIC_T_SIZE; ngx_value=$ngx_size; . auto/types/value

ngx_type="socklen_t"; ngx_types="int"; . auto/types/typedef

-ngx_type="in_addr_t"; ngx_types="uint32_t"; . auto/types/typedef
+ngx_type="in_addr_t"; ngx_types="uint32_t:u_int32_t"; . auto/types/typedef

ngx_type="in_port_t"; ngx_types="u_short"; . auto/types/typedef

Index: auto/types/sizeof
===================================================================
--- auto/types/sizeof (revision 2825)
+++ auto/types/sizeof (working copy)
@@ -21,6 +21,7 @@
#include <signal.h>
#include <sys/resource.h>
$NGX_INCLUDE_INTTYPES_H
+$NGX_INCLUDE_SYS_BITYPES_H
$NGX_INCLUDE_AUTO_CONFIG_H

int main() {
Index: auto/types/typedef
===================================================================
--- auto/types/typedef (revision 2825)
+++ auto/types/typedef (working copy)
@@ -12,6 +12,8 @@
END

ngx_found=no
+ngx_ifs=$IFS
+IFS=:

for ngx_try in $ngx_type $ngx_types
do
@@ -25,6 +27,7 @@
#include <sys/resource.h>
#include <netinet/in.h>
$NGX_INCLUDE_INTTYPES_H
+$NGX_INCLUDE_SYS_BITYPES_H

int main() {
$ngx_try i = 0;
@@ -74,3 +77,5 @@
if [ $ngx_found != yes ]; then
echo "typedef $ngx_found $ngx_type;" >> $NGX_AUTO_CONFIG_H
fi
+
+IFS=$ngx_ifs
Index: auto/headers
===================================================================
--- auto/headers (revision 2825)
+++ auto/headers (working copy)
@@ -9,4 +9,5 @@
ngx_include="sys/param.h"; . auto/include
ngx_include="sys/mount.h"; . auto/include
ngx_include="sys/statvfs.h"; . auto/include
+ngx_include="sys/bitypes.h"; . auto/include
ngx_include="crypt.h"; . auto/include
On Thu, Apr 29, 2010 at 09:46:00AM -0400, Brian Lewis wrote:

> On Thursday, 29.04.10 at 10:30, Igor Sysoev wrote:
> > On Wed, Apr 28, 2010 at 04:07:57PM -0400, Brian Lewis wrote:
> > > checking for in_addr_t ... in_addr_t not found uint32_t not found
> > > ./configure: error: can not define in_addr_t
> >
> > What is in objs/autoconf.err after
> > checking for sys/bitypes.h
> > ?
>
> There are no errors in that section. <sys/bitypes.h> defines u_int32_t,
> though.

Well, here is a new patch.


--
Igor Sysoev
http://sysoev.ru/en/

Re: defining uint64_t, etc., during configure

On Thursday, 29.04.10 at 10:30, Igor Sysoev wrote:
> On Wed, Apr 28, 2010 at 04:07:57PM -0400, Brian Lewis wrote:
> > checking for in_addr_t ... in_addr_t not found uint32_t not found
> > ./configure: error: can not define in_addr_t
>
> What is in objs/autoconf.err after
> checking for sys/bitypes.h
> ?

There are no errors in that section. <sys/bitypes.h> defines u_int32_t,
though.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: proxy_cache_path question

On Thu, Apr 29, 2010 at 11:24:51AM +0200, Marlon de Boer wrote:

> Hi list,
>
> I'm trying to limit the amount of data nginx caches but can't get it to
> work properly.
>
> I'm using the following line to limit the cache:
>
> proxy_cache_path /var/tmp/nginx/cache levels=1:2 keys_zone=cache:32m
> inactive=1440 max_size=32m;
>
> Is my assumption correct that this cache cannot grow any bigger than
> 32Mb? What I see in my case is /var/tmp/nginx/cache grows well above
> 32Mb (in my test I've seen 46Mb).
>
> Does anybody has a suggestion to get the cache limit to work?

It may be bigger at least for two reasons:
1) nginx counts only file size rounded to file system block size.
For example, on UFS it's fragment size.
As I understand, "du" counts in 1K blocks.
2) levels=1:2 means that nginx will create at least 8M directory hierarchy.


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

proxy_cache_path question

Hi list,

I'm trying to limit the amount of data nginx caches but can't get it to
work properly.

I'm using the following line to limit the cache:

proxy_cache_path /var/tmp/nginx/cache levels=1:2 keys_zone=cache:32m
inactive=1440 max_size=32m;

Is my assumption correct that this cache cannot grow any bigger than
32Mb? What I see in my case is /var/tmp/nginx/cache grows well above
32Mb (in my test I've seen 46Mb).

Does anybody has a suggestion to get the cache limit to work?

Regards,

Marlon

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

2010年4月28日星期三

Re: defining uint64_t, etc., during configure

On Wed, Apr 28, 2010 at 04:07:57PM -0400, Brian Lewis wrote:

> On Thursday, 29.04.10 at 00:01, Igor Sysoev wrote:
> > Sorry, this patch is wrong. Here is a new one.
>
> Thanks.
>
> checking for int size ... 4 bytes
> checking for long size ... 4 bytes
> checking for long long size ... 8 bytes
> checking for void * size ... 4 bytes
> checking for int64_t ... int64_t not found, long long used
> checking for uint64_t ... uint64_t not found u_int64_t not found, unsigned long long used
> checking for sig_atomic_t ... found
> checking for sig_atomic_t size ... 4 bytes
> checking for socklen_t ... socklen_t not found, int used
> checking for in_addr_t ... in_addr_t not found uint32_t not found
> ./configure: error: can not define in_addr_t

What is in objs/autoconf.err after
checking for sys/bitypes.h
?


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: FRiCKLE Labs & MegiTeam pres. ngx_supervisord

Version 1.4 is now available at:
http://labs.frickle.com/nginx_ngx_supervisord/

Changes:
2010-04-29 VERSION 1.4
* Send shutdown command to supervisord on backend failure
and try to bring back first backend after all backends fail.
This is default and non-configurable behavior.
Requested by Grzegorz Nosek.

Best regards,
Piotr Sikora < piotr.sikora@frickle.com >

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

where can i report bugs?

Hello!
I have found a bug.

where is the right place to submit details?

Here the details:

if you using [b]default_type application/octet-stream;[/b] than will the error.log allso typ: application/octet-stream

i think its a bug, logs must have always text/plain

Best regards
Josef Fröhle
DeineAgentur UG

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,80444,80444#msg-80444


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

On Thursday, 29.04.10 at 00:01, Igor Sysoev wrote:
> Sorry, this patch is wrong. Here is a new one.

Thanks.

checking for int size ... 4 bytes
checking for long size ... 4 bytes
checking for long long size ... 8 bytes
checking for void * size ... 4 bytes
checking for int64_t ... int64_t not found, long long used
checking for uint64_t ... uint64_t not found u_int64_t not found, unsigned long long used
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... socklen_t not found, int used
checking for in_addr_t ... in_addr_t not found uint32_t not found
./configure: error: can not define in_addr_t

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

On Wednesday, 28.04.10 at 23:51, Igor Sysoev wrote:
> Well, here is a new patch.

Thank you.

creating objs/Makefile
checking for int size ... 4 bytes
checking for long size ... 4 bytes
checking for long long size ... 8 bytes
checking for void * size ... 4 bytes
checking for int64_t ... int64_t not found, long used
checking for uint64_t ... uint64_t not found u_int64_t:unsigned not found, long used
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... socklen_t not found, int used
checking for in_addr_t ... in_addr_t not found uint32_t not found
./configure: error: can not define in_addr_t

No definition for in_addr_t exists anywhere in /usr/include.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

Index: src/os/unix/ngx_posix_config.h
===================================================================
--- src/os/unix/ngx_posix_config.h (revision 2825)
+++ src/os/unix/ngx_posix_config.h (working copy)
@@ -33,6 +33,9 @@
#if (NGX_HAVE_INTTYPES_H)
#include <inttypes.h>
#endif
+#if (NGX_HAVE_BITYPES_H)
+#include <sys/bitypes.h>
+#endif
#include <stdarg.h>
#include <stddef.h> /* offsetof() */
#include <stdio.h>
Index: auto/unix
===================================================================
--- auto/unix (revision 2825)
+++ auto/unix (working copy)
@@ -30,8 +30,11 @@
;;
esac

-ngx_type="uint64_t"; ngx_types="u_int64_t"; . auto/types/typedef
+ngx_type="int64_t"; ngx_types="long long"; . auto/types/typedef

+ngx_type="uint64_t"; ngx_types="u_int64_t:unsigned long long"
+. auto/types/typedef
+
ngx_type="sig_atomic_t"; ngx_types="int"; . auto/types/typedef
. auto/types/sizeof
ngx_param=NGX_SIG_ATOMIC_T_SIZE; ngx_value=$ngx_size; . auto/types/value
Index: auto/types/sizeof
===================================================================
--- auto/types/sizeof (revision 2825)
+++ auto/types/sizeof (working copy)
@@ -21,6 +21,7 @@
#include <signal.h>
#include <sys/resource.h>
$NGX_INCLUDE_INTTYPES_H
+$NGX_INCLUDE_SYS_BITYPES_H
$NGX_INCLUDE_AUTO_CONFIG_H

int main() {
Index: auto/types/typedef
===================================================================
--- auto/types/typedef (revision 2825)
+++ auto/types/typedef (working copy)
@@ -12,6 +12,8 @@
END

ngx_found=no
+ngx_ifs=$IFS
+IFS=:

for ngx_try in $ngx_type $ngx_types
do
@@ -25,6 +27,7 @@
#include <sys/resource.h>
#include <netinet/in.h>
$NGX_INCLUDE_INTTYPES_H
+$NGX_INCLUDE_SYS_BITYPES_H

int main() {
$ngx_try i = 0;
@@ -74,3 +77,5 @@
if [ $ngx_found != yes ]; then
echo "typedef $ngx_found $ngx_type;" >> $NGX_AUTO_CONFIG_H
fi
+
+IFS=$ngx_ifs
Index: auto/headers
===================================================================
--- auto/headers (revision 2825)
+++ auto/headers (working copy)
@@ -9,4 +9,5 @@
ngx_include="sys/param.h"; . auto/include
ngx_include="sys/mount.h"; . auto/include
ngx_include="sys/statvfs.h"; . auto/include
+ngx_include="sys/bitypes.h"; . auto/include
ngx_include="crypt.h"; . auto/include
On Wed, Apr 28, 2010 at 11:51:53PM +0400, Igor Sysoev wrote:

> On Wed, Apr 28, 2010 at 03:42:45PM -0400, Brian Lewis wrote:
>
> > On Wednesday, 28.04.10 at 23:18, Igor Sysoev wrote:
> > > It seems <sys/bitypes.h> is the right way to use int32_t, etc. on SCO.
> > > Could you try the attached patch ?
> >
> > Thank you for the patch.
> >
> > checking for uint64_t ... uint64_t not found u_int64_t not found
> > ./configure: error: can not define uint64_t
> >
> > <sys/bitypes.h> defines int32_t and u_int32_t, but I don't see any
> > definitions for int64_t or u_int64_t anywhere in /usr/include.
>
> Well, here is a new patch.

Sorry, this patch is wrong. Here is a new one.


--
Igor Sysoev
http://sysoev.ru/en/

Re: nginx compression-at-edge (in front of a reverse proxy) compresses some content, not other ?

Igor,

On Wed, Apr 28, 2010 at 12:42 PM, Igor Sysoev <igor@sysoev.ru> wrote:
> I understand the idea, but do not see any issues with nginx.
> Probably you need something like this:

I'll give this, specifically, a try then. The issues others were
having may be (a) Drupal specific (I'm migrating off ...), &/or (b)
old.

Thanks!

Ben

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

Index: src/os/unix/ngx_posix_config.h
===================================================================
--- src/os/unix/ngx_posix_config.h (revision 2825)
+++ src/os/unix/ngx_posix_config.h (working copy)
@@ -33,6 +33,9 @@
#if (NGX_HAVE_INTTYPES_H)
#include <inttypes.h>
#endif
+#if (NGX_HAVE_BITYPES_H)
+#include <sys/bitypes.h>
+#endif
#include <stdarg.h>
#include <stddef.h> /* offsetof() */
#include <stdio.h>
Index: auto/unix
===================================================================
--- auto/unix (revision 2825)
+++ auto/unix (working copy)
@@ -30,8 +30,11 @@
;;
esac

-ngx_type="uint64_t"; ngx_types="u_int64_t"; . auto/types/typedef
+ngx_type="int64_t"; ngx_types="long long"; . auto/types/typedef

+ngx_type="uint64_t"; ngx_types="u_int64_t:unsigned long long"
+. auto/types/typedef
+
ngx_type="sig_atomic_t"; ngx_types="int"; . auto/types/typedef
. auto/types/sizeof
ngx_param=NGX_SIG_ATOMIC_T_SIZE; ngx_value=$ngx_size; . auto/types/value
Index: auto/types/sizeof
===================================================================
--- auto/types/sizeof (revision 2825)
+++ auto/types/sizeof (working copy)
@@ -21,6 +21,7 @@
#include <signal.h>
#include <sys/resource.h>
$NGX_INCLUDE_INTTYPES_H
+$NGX_INCLUDE_SYS_BITYPES_H
$NGX_INCLUDE_AUTO_CONFIG_H

int main() {
Index: auto/types/typedef
===================================================================
--- auto/types/typedef (revision 2825)
+++ auto/types/typedef (working copy)
@@ -12,6 +12,7 @@
END

ngx_found=no
+ngx_ifs=$IFS

for ngx_try in $ngx_type $ngx_types
do
@@ -25,6 +26,7 @@
#include <sys/resource.h>
#include <netinet/in.h>
$NGX_INCLUDE_INTTYPES_H
+$NGX_INCLUDE_SYS_BITYPES_H

int main() {
$ngx_try i = 0;
@@ -74,3 +76,5 @@
if [ $ngx_found != yes ]; then
echo "typedef $ngx_found $ngx_type;" >> $NGX_AUTO_CONFIG_H
fi
+
+IFS=$ngx_ifs
Index: auto/headers
===================================================================
--- auto/headers (revision 2825)
+++ auto/headers (working copy)
@@ -9,4 +9,5 @@
ngx_include="sys/param.h"; . auto/include
ngx_include="sys/mount.h"; . auto/include
ngx_include="sys/statvfs.h"; . auto/include
+ngx_include="sys/bitypes.h"; . auto/include
ngx_include="crypt.h"; . auto/include
On Wed, Apr 28, 2010 at 03:42:45PM -0400, Brian Lewis wrote:

> On Wednesday, 28.04.10 at 23:18, Igor Sysoev wrote:
> > It seems <sys/bitypes.h> is the right way to use int32_t, etc. on SCO.
> > Could you try the attached patch ?
>
> Thank you for the patch.
>
> checking for uint64_t ... uint64_t not found u_int64_t not found
> ./configure: error: can not define uint64_t
>
> <sys/bitypes.h> defines int32_t and u_int32_t, but I don't see any
> definitions for int64_t or u_int64_t anywhere in /usr/include.

Well, here is a new patch.


--
Igor Sysoev
http://sysoev.ru/en/

Re: defining uint64_t, etc., during configure

On Wednesday, 28.04.10 at 23:18, Igor Sysoev wrote:
> It seems <sys/bitypes.h> is the right way to use int32_t, etc. on SCO.
> Could you try the attached patch ?

Thank you for the patch.

checking for uint64_t ... uint64_t not found u_int64_t not found
./configure: error: can not define uint64_t

<sys/bitypes.h> defines int32_t and u_int32_t, but I don't see any
definitions for int64_t or u_int64_t anywhere in /usr/include.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: nginx compression-at-edge (in front of a reverse proxy) compresses some content, not other ?

On Wed, Apr 28, 2010 at 12:29:29PM -0700, Ben DJ wrote:

> > I did not understand what that parallel CDN does and what problem you
> > have encountered.
>
> A good description is here, http://drupal.org/project/parallel
>
> Basically, serving various content types in parallel from Varnish
> in-memory caches, in particular when memcache(d) is not an option due
> to low RAM constraints (on a VPS ...).
>
> The performance boost -- admittedly under the right concurrent loads
> -- can be dramatic.

I understand the idea, but do not see any issues with nginx.
Probably you need something like this:

server {
server_name example.com
cdn1.example.com
cdn2.example.com
cdn3.example.com
;

location / {
proxy_pass http://backend;
...
}

location ~ \.(js|css|gif|jpe?g|png)$ {
proxy_pass http://backend;
...
proxy_cache CACHE;
}

The files http://cdn1.example.com/some.js and http://cdn2.example.com/some.js
will be stored in nginx cache as single file with key
http://backend/some.js.


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: nginx compression-at-edge (in front of a reverse proxy) compresses some content, not other ?

Hi Igor,

> nginx uses file cache as persistent storage, however, once a response
(snip)

Thanks for the explanation. I'll, eventually, get around to giving
the capability a try in nginx. At the very least, the performance
comparisons will be interesting ...

> I did not understand what that parallel CDN does and what problem you
> have encountered.

A good description is here, http://drupal.org/project/parallel

Basically, serving various content types in parallel from Varnish
in-memory caches, in particular when memcache(d) is not an option due
to low RAM constraints (on a VPS ...).

The performance boost -- admittedly under the right concurrent loads
-- can be dramatic.

> Try "gzip -1 some.js" and "gzip -9 some.js" to see the difference.
> Also you may try to gzip a large file to see time difference.

Thanks!

Ben

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

Index: src/os/unix/ngx_posix_config.h
===================================================================
--- src/os/unix/ngx_posix_config.h (revision 2825)
+++ src/os/unix/ngx_posix_config.h (working copy)
@@ -33,6 +33,9 @@
#if (NGX_HAVE_INTTYPES_H)
#include <inttypes.h>
#endif
+#if (NGX_HAVE_BITYPES_H)
+#include <sys/bitypes.h>
+#endif
#include <stdarg.h>
#include <stddef.h> /* offsetof() */
#include <stdio.h>
Index: auto/types/sizeof
===================================================================
--- auto/types/sizeof (revision 2825)
+++ auto/types/sizeof (working copy)
@@ -21,6 +21,7 @@
#include <signal.h>
#include <sys/resource.h>
$NGX_INCLUDE_INTTYPES_H
+$NGX_INCLUDE_SYS_BITYPES_H
$NGX_INCLUDE_AUTO_CONFIG_H

int main() {
Index: auto/types/typedef
===================================================================
--- auto/types/typedef (revision 2825)
+++ auto/types/typedef (working copy)
@@ -25,6 +25,7 @@
#include <sys/resource.h>
#include <netinet/in.h>
$NGX_INCLUDE_INTTYPES_H
+$NGX_INCLUDE_SYS_BITYPES_H

int main() {
$ngx_try i = 0;
Index: auto/headers
===================================================================
--- auto/headers (revision 2825)
+++ auto/headers (working copy)
@@ -9,4 +9,5 @@
ngx_include="sys/param.h"; . auto/include
ngx_include="sys/mount.h"; . auto/include
ngx_include="sys/statvfs.h"; . auto/include
+ngx_include="sys/bitypes.h"; . auto/include
ngx_include="crypt.h"; . auto/include
On Tue, Apr 27, 2010 at 04:09:36PM -0400, Brian Lewis wrote:

> On Tuesday, 27.04.10 at 23:50, Igor Sysoev wrote:
> > It seems SCO has int32_t. Then could you show what is after
> > "checking for int32_t" in objs/autoconf.err ?
>
> objs/autotest.c: In function `main':
> objs/autotest.c:11: error: `int32_t' undeclared (first use in this function)
> objs/autotest.c:11: error: (Each undeclared identifier is reported only once
> objs/autotest.c:11: error: for each function it appears in.)
> objs/autotest.c:11: error: parse error before "i"
> ----------
>
> #include <sys/types.h>
> #include <signal.h>
> #include <sys/socket.h>
> #include <sys/time.h>
> #include <sys/resource.h>
> #include <netinet/in.h>
>
>
> int main() {
> int32_t i = 0;
> return 0;
> }
>
> Adding '#include <sys/bitypes.h>' lets autotest.c compile.

It seems <sys/bitypes.h> is the right way to use int32_t, etc. on SCO.
Could you try the attached patch ?


--
Igor Sysoev
http://sysoev.ru/en/

Re: nginx compression-at-edge (in front of a reverse proxy) compresses some content, not other ?

On Wed, Apr 28, 2010 at 08:33:03AM -0700, Ben DJ wrote:

> > BTW, why do you use varnish instead of nginx built-in proxy cache ?
>
> I'd originally had Pound in front of varnish; Nginx was a logical
> choice to replace it, as a first step.
>
> As for using it as a proxy cache ... Varnish provides all in-memory
> caching. I simply don't know if nginx.

nginx uses file cache as persistent storage, however, once a response
has been served from nginx cache, the response is cached in OS VM cache,
and then nginx does not read from disk. If your hot content fits in
a host memory it will be served from OS VM cache without disk access as
in-memory cache. nginx usually uses sendfile() to send the cached responses,
so only one copy of file present in the host memory.

Varnish mmap()s a large file and stores responses in the mmap()ed memory,
i.e. in this file. However, since it mmap()s using MAP_NOSYNC flags,
so the stored data are not usually written to disk. The data will be
flushed to disk if there is memory shortage. Varnish uses sendfile()
too, so it also has a single copy of each response in the memory.
Varnish does not store cached responses just in memory (without file mmap),
because it can not use sendfile() in this case and then some responses
will be storage in OS memory in several copies: one in Varnish memory cache
and several in network buffers.

> Also, I use Varnish to provide a content-based parallel CDN. Attempts
> to do it with nginx failed, and, it appeared others were having issue
> as well (http://groups.drupal.org/node/48182). The nginx + varnish
> solution works well.

I did not understand what that parallel CDN does and what problem you
have encountered.

> > Also, "gzip_comp_level 1" is enough. 9th level simply eats more CPU, but
> > do not produce proportional cmpression ratio. Say, 1 decreases file 2 times
> > while 9 - only 2.5, but not 5 times.
>
> I didn't realize that the difference was _that_ small ...

Try "gzip -1 some.js" and "gzip -9 some.js" to see the difference.
Also you may try to gzip a large file to see time difference.


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: nginx compression-at-edge (in front of a reverse proxy) compresses some content, not other ?

Hi Guillaume,

I think we crossed messages in the mail ...

On Wed, Apr 28, 2010 at 8:45 AM, Guillaume Filion <gfk@logidac.com> wrote:
> Your Apache/Varnish server returns:
> Content-Type: text/x-js
> for javascript files while nginx is configured to compress only those types:
> gzip_types text/plain text/css text/xml text/javascript
> application/x-javascript;
>
> My guess is that you should configure apache or varnish to return
> Content-Type: text/javascript
> instead.

Yes, I'd discovered that. For now I added the type to nginx's
gzip-types, and it seems to work.

I'll keep that there until I discover WHY my distro's apache2 _ships_
with that type definition in its mimetypes. I *suspect* some compat
with deprecated browser support, but it's just as likely a mistake ...
just not clear.

In any case -- thanks!

Ben

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: nginx compression-at-edge (in front of a reverse proxy) compresses some content, not other ?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvYWDgACgkQCQALUqp8khC00gCeMv0+1GEeyLmf2LNluQOa0o6Q
OhAAnjHlgCvhhsbqrI+W6rCwqVk+GD2l
=IY82
-----END PGP SIGNATURE-----
Hi Ben,

Your Apache/Varnish server returns:
Content-Type: text/x-js
for javascript files while nginx is configured to compress only those types:
gzip_types text/plain text/css text/xml text/javascript
application/x-javascript;

My guess is that you should configure apache or varnish to return
Content-Type: text/javascript
instead.

Hope this helps,
GFK's
--
Guillaume Filion
http://guillaume.filion.org/

Re: nginx compression-at-edge (in front of a reverse proxy) compresses some content, not other ?

Hi Igor,

On Tue, Apr 27, 2010 at 11:25 PM, Igor Sysoev <igor@sysoev.ru> wrote:
>> Any ideas why/where the .js is not getting gzipped?

> You may set on it on nginx side:
> proxy_set_header Accept-Encoding "";

Done. Thanks.

> In your examples .js response has 304 code without body, so here is
> nothing to gzip, and .gif response has 404 code and it is not image,
> but text/html, so it is gzipped.

Yup. Those 304s were a result of local caching in the client.
Cleared that, and retried -- getting 200s, as expected, BUT, still no
js gzip.

Turns out that there was another issue, caught @ varnish list ...
namely, that the js is being served with Content-Type: text/x-js --
which was NOT added to the nginx gzip-types.

The cause is,

grep js /etc/apache2/mime.types
application/javascript js
text/x-js js

defined in the standard distro-release of apache2. not mentioned at
all in the rfc (http://www.ietf.org/rfc/rfc4329.txt), but widely used,
apparently, nonetheless. so, added it to gzip types, and tried again.


now, headers show BOTH js & css being compressed, as intended,

----------------------------------------------------------
https://my.site.com/apostrophePlugin/js/jquery.autogrow.js


GET /apostrophePlugin/js/jquery.autogrow.js HTTP/1.1
Host: my.site.com
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100417
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://my.site.com/
Cookie: symfony=R%2Cq-BqTdX-ckfGCqHa2MnDsbJpd

HTTP/1.1 200 OK
Server: nginx/0.8.35
Date: Wed, 28 Apr 2010 15:09:34 GMT
Content-Type: text/x-js
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Last-Modified: Wed, 28 Apr 2010 04:42:23 GMT
Etag: "267f6-db6-48544a2d549c0"
Cache-Control: max-age=259200
Expires: Sat, 01 May 2010 15:09:34 GMT
X-Varnish: 1289869751 1289869733
Age: 283
Via: 1.1 varnish
Content-Encoding: gzip

----------------------------------------------------------
https://my.site.com/apostrophePlugin/css/a.css

GET /apostrophePlugin/css/a.css HTTP/1.1
Host: my.site.com
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100417
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://my.site.com/
Cookie: symfony=R%2Cq-BqTdX-ckfGCqHa2MnDsbJpd

HTTP/1.1 200 OK
Server: nginx/0.8.35
Date: Wed, 28 Apr 2010 15:09:34 GMT
Content-Type: text/css
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Last-Modified: Wed, 28 Apr 2010 04:42:21 GMT
Etag: "26233-14e26-48544a2b6c540"
Cache-Control: max-age=259200
Expires: Sat, 01 May 2010 15:09:34 GMT
X-Varnish: 1289869748
Age: 0
Via: 1.1 varnish
Content-Encoding: gzip

----------------------------------------------------------

AND, the YSlow plugin now 'grades' the page an "A".

> BTW, why do you use varnish instead of nginx built-in proxy cache ?

I'd originally had Pound in front of varnish; Nginx was a logical
choice to replace it, as a first step.

As for using it as a proxy cache ... Varnish provides all in-memory
caching. I simply don't know if nginx.

Also, I use Varnish to provide a content-based parallel CDN. Attempts
to do it with nginx failed, and, it appeared others were having issue
as well (http://groups.drupal.org/node/48182). The nginx + varnish
solution works well.

> BTW, in 0.7.12+ you may use
> gzip_disable msie6;
> instead of
> gzip_disable "MSIE [1-6].(?!.*SV1)";
> It's faster.

Missed that one completely. Thanks.

> Also, "gzip_comp_level 1" is enough. 9th level simply eats more CPU, but
> do not produce proportional cmpression ratio. Say, 1 decreases file 2 times
> while 9 - only 2.5, but not 5 times.

I didn't realize that the difference was _that_ small ...

Thanks for the help!

Ben

>
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: Turn off 'fastcgi_buffers'

I think it is not possible !

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,76077,80216#msg-80216


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: ngx_chunkin does not support PUT requests yet (Was Re: PUT support for chunked encoding with no Content-Length header)

On Tue, Apr 27, 2010 at 10:23 PM, agentzh <agentzh@gmail.com> wrote:
> I've never tried PUT in my test suite. I'll try fixing it in the next
> release. It should be a simple fix in the
> ngx_http_chunkin_is_chunked_encod
> ing function. Thanks for the report!

Great - thanks for the update. I'm anxious to try this out and am
happy to test out builds once you have something you think is ready
for release. Feel free to contact me directly if I can help.

Thanks,
Aaron

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: Reverse Proxy with caching

Rafa Pedroche wrote:

> Hi, I have a similar error with version 0.8.36...
>
> [emerg]: unknown directive "proxy_cache_path" in
> /usr/local/nginx/nginx.conf:33
>
> The line is the following:
>
> proxy_cache_path /var/lib/nginx/cache levels=1:2
> keys_zone=staticfilecache:180m max_size=500m;
>
> what's wrong? thank you
>
> (nginx -v --> nginx version: nginx/0.8.36)

Solved: the problem only appears if all the configuration is in the
nginx.conf. Using "include files" works ok. My mistate, I thought both
solution are equivalent.
--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

2010年4月27日星期二

Re: nginx compression-at-edge (in front of a reverse proxy) compresses some content, not other ?

On Tue, Apr 27, 2010 at 09:12:13PM -0400, BenDJ wrote:

> I've an nginx + varnish + apache2 stack. Nginz server as redirector, ssl handshake, and gzip compression. Varnish serves as a reverse-proxy, and apache 'just' hosts apps & serves content.
>
> I'm trying to get gzip compression behaving properly. I'm getting intermittent results -- some content seems to be gzipped, some not.
>
> I'm looking for some help figuring out WHERE the problem lies, and what to do to fix it.
>
> In nginx conf, I've,
>
> [code]
> ...
> http {
> ...
> gzip on;
> gzip_http_version 1.0;
> gzip_comp_level 9;
> gzip_proxied any;
> gzip_buffers 16 8k;
> gzip_min_length 0;
> gzip_types text/plain text/css text/xml text/javascript application/x-javascript;
> gzip_disable "MSIE [1-6].(?!.*SV1)";
> gzip_vary on;

BTW, in 0.7.12+ you may use
gzip_disable msie6;
instead of
gzip_disable "MSIE [1-6].(?!.*SV1)";
It's faster.

Also, "gzip_comp_level 1" is enough. 9th level simply eats more CPU, but
do not produce proportional cmpression ratio. Say, 1 decreases file 2 times
while 9 - only 2.5, but not 5 times.


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: nginx compression-at-edge (in front of a reverse proxy) compresses some content, not other ?

On Tue, Apr 27, 2010 at 09:12:13PM -0400, BenDJ wrote:

> I've an nginx + varnish + apache2 stack. Nginz server as redirector, ssl handshake, and gzip compression. Varnish serves as a reverse-proxy, and apache 'just' hosts apps & serves content.
>
> I'm trying to get gzip compression behaving properly. I'm getting intermittent results -- some content seems to be gzipped, some not.
>
> I'm looking for some help figuring out WHERE the problem lies, and what to do to fix it.
>
> In nginx conf, I've,
>
> [code]
> ...
> http {
> ...
> gzip on;
> gzip_http_version 1.0;
> gzip_comp_level 9;
> gzip_proxied any;
> gzip_buffers 16 8k;
> gzip_min_length 0;
> gzip_types text/plain text/css text/xml text/javascript application/x-javascript;
> gzip_disable "MSIE [1-6].(?!.*SV1)";
> gzip_vary on;
>
> upstream varnish {
> server 127.0.0.1:8090 weight=10 max_fails=3 fail_timeout=15s;
> }
>
> server {
> listen x.y.z.w:443;
> ...
> location / {
> proxy_pass http://varnish;
> proxy_redirect off;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header X-Client-Verify SUCCESS;
> proxy_set_header X-SSL-Subject $ssl_client_s_dn;
> proxy_set_header X-SSL-Issuer $ssl_client_i_dn;
> }
> }
> ...
> [/code]
>
>
> In varnish config, I've a
>
> [code]
> ...
> if (req.http.Accept-Encoding) {
> remove req.http.Accept-Encoding;
> }
> ...
> [/code]
>
>
> clause, since the compression is to be done only at the nginx 'edge'.

You may set on it on nginx side:
proxy_set_header Accept-Encoding "";
>
> Apache's compression (gzip, default, or otherwise), is completely disabled.
>
> Atm, a check of my test site with YSlow complains that .js's are NOT being compressed. Checking with LiveHTTPHeaders Firefox plugin, shows, e.g., the .js in question NOT being gzipped, but a .gif *is*, e.g.
>
> [code]
> ...
> ----------------------------------------------------------
>
> https://my.site.com/main/apostrophePlugin/js/jquery.keycodes-0.2.js
>
>
>
> GET /main/apostrophePlugin/js/jquery.keycodes-0.2.js HTTP/1.1
> Host: my.site.com
> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100417
> Accept: */*
> Accept-Language: en-us,en;q=0.5
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 115
> Connection: keep-alive
> Referer: https://my.site.com/main/
> Cookie: SESS6fa8cdc2d7064704bbda0c83e2c2588c=94889db68945e19ed6f666b7e00cdd36; symfony=3KOH8Qk0hV%2C%2CvXLi0PK5YmdenP1
> If-Modified-Since: Tue, 27 Apr 2010 18:18:18 GMT
> If-None-Match: "362e4-1008-4853810064180"
> Authorization: Digest username="admin", realm="AUTH my.site.com", nonce="5GopBDmFBAA=99f7be8796e018dde459a07178393d235366ecd9", uri="/main/apostrophePlugin/js/jquery.keycodes-0.2.js", algorithm=MD5, response="b04cb995cd1f86a67197aab3b5a5dbc9", qop=auth, nc=000001c9, cnonce="9dbeaefee4d57b12"
> Cache-Control: max-age=0
>
>
>
> HTTP/1.1 304 Not Modified
> Server: nginx/0.8.35
> Date: Wed, 28 Apr 2010 00:39:48 GMT
> Connection: keep-alive
> Etag: "362e4-1008-4853beaefee80"
> Expires: Sat, 01 May 2010 00:39:48 GMT
> Cache-Control: max-age=259200
> Content-Length: 0
> X-Varnish: 940462008
> Age: 0
> Via: 1.1 varnish
>
> ----------------------------------------------------------
>
> https://my.site.com/apostrophePlugin/images/a-special-blank.gif
>
> GET /apostrophePlugin/images/a-special-blank.gif HTTP/1.1
> Host: my.site.com
> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100417
> Accept: image/png,image/*;q=0.8,*/*;q=0.5
> Accept-Language: en-us,en;q=0.5
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 115
> Connection: keep-alive
> Referer: https://my.site.com/main/
> Cookie: SESS6fa8cdc2d7064704bbda0c83e2c2588c=94889db68945e19ed6f666b7e00cdd36; symfony=3KOH8Qk0hV%2C%2CvXLi0PK5YmdenP1
>
> HTTP/1.1 404 Not Found
> Server: nginx/0.8.35
> Date: Wed, 28 Apr 2010 00:39:48 GMT
> Content-Type: text/html; charset=iso-8859-1
> Transfer-Encoding: chunked
> Connection: keep-alive
> Vary: Accept-Encoding, accept-language,accept-charset
> Content-Language: en
> X-Varnish: 940462009 940461993
> Age: 87
> Via: 1.1 varnish
> Content-Encoding: gzip
> ----------------------------------------------------------
> ...
> [/code]
>
>
> where, iiuc, the presence/absence of "Content-Encoding: gzip" defines whether or not the item in question was succesfully gzipped.
>
> Any ideas why/where the .js is not getting gzipped?

In your examples .js response has 304 code without body, so here is
nothing to gzip, and .gif response has 404 code and it is not image,
but text/html, so it is gzipped.

BTW, why do you use varnish instead of nginx built-in proxy cache ?


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

ngx_chunkin does not support PUT requests yet (Was Re: PUT support for chunked encoding with no Content-Length header)

On Mon, Apr 26, 2010 at 12:35 AM, Aaron Nichols <anichols@trumped.org> wrote:
> On Sun, Apr 25, 2010 at 4:06 AM, agentzh <agentzh@gmail.com> wrote:
>> You may find the ngx_chunkin module helpful:
>>
>>    http://wiki.nginx.org/NginxHttpChunkinModule
>
> Yep, I tried this module right off the bat and received the same
> error.

Okay, my bad. ngx_chunkin does not support PUT requests yet (The nginx
core goes another route for non-POST requests with chunked encoding.).

I've never tried PUT in my test suite. I'll try fixing it in the next
release. It should be a simple fix in the
ngx_http_chunkin_is_chunked_encod
ing function. Thanks for the report!

BTW, nginx will still print that error message to error.log even if
ngx_chunkin works. Because nginx aggressively checks this case when it
parses request headers and ngx_chunkin cannot take any action before
that. Commenting out that ngx_log_error line in the nginx core should
work ;)

Cheers,
-agentzh

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

AuthBasic Module

Currently have set up on my server Auth basic with the following config

location ^~/eng/photos {
auth_basic "Please Login";
auth_basic_user_file /etc/nginx/passwords;
}

Even though it does work, using openssl to encrypt passwords, how do I enable it so that
login is required everytime a user access's that page. It only authenticates the first time.

Daryl


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

nginx compression-at-edge (in front of a reverse proxy) compresses some content, not other ?

I've an nginx + varnish + apache2 stack. Nginz server as redirector, ssl handshake, and gzip compression. Varnish serves as a reverse-proxy, and apache 'just' hosts apps & serves content.

I'm trying to get gzip compression behaving properly. I'm getting intermittent results -- some content seems to be gzipped, some not.

I'm looking for some help figuring out WHERE the problem lies, and what to do to fix it.

In nginx conf, I've,

[code]
...
http {
...
gzip on;
gzip_http_version 1.0;
gzip_comp_level 9;
gzip_proxied any;
gzip_buffers 16 8k;
gzip_min_length 0;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript;
gzip_disable "MSIE [1-6].(?!.*SV1)";
gzip_vary on;

upstream varnish {
server 127.0.0.1:8090 weight=10 max_fails=3 fail_timeout=15s;
}

server {
listen x.y.z.w:443;
...
location / {
proxy_pass http://varnish;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Client-Verify SUCCESS;
proxy_set_header X-SSL-Subject $ssl_client_s_dn;
proxy_set_header X-SSL-Issuer $ssl_client_i_dn;
}
}
...
[/code]


In varnish config, I've a

[code]
...
if (req.http.Accept-Encoding) {
remove req.http.Accept-Encoding;
}
...
[/code]


clause, since the compression is to be done only at the nginx 'edge'.

Apache's compression (gzip, default, or otherwise), is completely disabled.

Atm, a check of my test site with YSlow complains that .js's are NOT being compressed. Checking with LiveHTTPHeaders Firefox plugin, shows, e.g., the .js in question NOT being gzipped, but a .gif *is*, e.g.

[code]
...
----------------------------------------------------------

https://my.site.com/main/apostrophePlugin/js/jquery.keycodes-0.2.js

GET /main/apostrophePlugin/js/jquery.keycodes-0.2.js HTTP/1.1
Host: my.site.com
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100417
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://my.site.com/main/
Cookie: SESS6fa8cdc2d7064704bbda0c83e2c2588c=94889db68945e19ed6f666b7e00cdd36; symfony=3KOH8Qk0hV%2C%2CvXLi0PK5YmdenP1
If-Modified-Since: Tue, 27 Apr 2010 18:18:18 GMT
If-None-Match: "362e4-1008-4853810064180"
Authorization: Digest username="admin", realm="AUTH my.site.com", nonce="5GopBDmFBAA=99f7be8796e018dde459a07178393d235366ecd9", uri="/main/apostrophePlugin/js/jquery.keycodes-0.2.js", algorithm=MD5, response="b04cb995cd1f86a67197aab3b5a5dbc9", qop=auth, nc=000001c9, cnonce="9dbeaefee4d57b12"
Cache-Control: max-age=0

HTTP/1.1 304 Not Modified
Server: nginx/0.8.35
Date: Wed, 28 Apr 2010 00:39:48 GMT
Connection: keep-alive
Etag: "362e4-1008-4853beaefee80"
Expires: Sat, 01 May 2010 00:39:48 GMT
Cache-Control: max-age=259200
Content-Length: 0
X-Varnish: 940462008
Age: 0
Via: 1.1 varnish

----------------------------------------------------------

https://my.site.com/apostrophePlugin/images/a-special-blank.gif

GET /apostrophePlugin/images/a-special-blank.gif HTTP/1.1
Host: my.site.com
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100417
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://my.site.com/main/
Cookie: SESS6fa8cdc2d7064704bbda0c83e2c2588c=94889db68945e19ed6f666b7e00cdd36; symfony=3KOH8Qk0hV%2C%2CvXLi0PK5YmdenP1

HTTP/1.1 404 Not Found
Server: nginx/0.8.35
Date: Wed, 28 Apr 2010 00:39:48 GMT
Content-Type: text/html; charset=iso-8859-1
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding, accept-language,accept-charset
Content-Language: en
X-Varnish: 940462009 940461993
Age: 87
Via: 1.1 varnish
Content-Encoding: gzip
----------------------------------------------------------
...
[/code]


where, iiuc, the presence/absence of "Content-Encoding: gzip" defines whether or not the item in question was succesfully gzipped.

Any ideas why/where the .js is not getting gzipped?

Thanks,

Ben

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,80148,80148#msg-80148


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

how to force nginx do return 204 and log it into access log?

Hi,

I'm trying to implement logic which apache making return status 204 instead of 200 and log it into access log.
It doing "RedirectMatch 204 xxxxx.gif$"
for nginx I have created this part of config which working very close to above:
[code]
if ( $request_uri ~ xxxxx.gif ) {
return 204;
}
location ~ xxxx.gif {
log_format special-v4 "$msec\t$args\t$http_cookie";
access_log /path/to/access.log special-v4;
empty_gif;
internal;
}
[/code]

so it works but not writing into log.

[code]
Next one writing into log but not giving response 204:
location ~ xxxx.gif {
log_format special-v4 "$msec\t$args\t$http_cookie";
access_log /path/to/access.log special-v4;
empty_gif;
internal;
return 204;
}
[/code]

My question: is it possible to have ability write access log and have retcode 204 without binary modification custom modules?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,80140,80140#msg-80140


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: Reverse Proxy with caching

Maxim Dounin wrote:
> Hello!
>
> On Mon, Oct 19, 2009 at 06:06:25PM -0400, avery wrote:
>
>> I am also trying to get the caching to work. Whenever I use the proxy_cache_path or proxy_cache directive I get this error when starting nginx and it fails to start- unknown directive "proxy_cache" - unknown directive "proxy_cache_path". Anyone know what I'm doing wrong? I am using Ubuntu 9.04 and installed NGINX from the repos.
>
> Cache support first appeared in nginx 0.7.45. Ubuntu 9.04 seems
> to have 0.6.35 in the package list.
>
> Maxim Dounin

Hi, I have a similar error with version 0.8.36...

[emerg]: unknown directive "proxy_cache_path" in
/usr/local/nginx/nginx.conf:33

The line is the following:

proxy_cache_path /var/lib/nginx/cache levels=1:2
keys_zone=staticfilecache:180m max_size=500m;

what's wrong? thank you

(nginx -v --> nginx version: nginx/0.8.36)

--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: [ANNOUNCE] gunzip filter module 0.3

Another question,
regarding checking status of upstream.
What do you think if change functionality for gunzip to have ability write config like this:
if ( $upstream_status = 200 ) {
gunzip on;
gunzip_options any;
}

?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,66713,80114#msg-80114


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

On Tuesday, 27.04.10 at 23:50, Igor Sysoev wrote:
> It seems SCO has int32_t. Then could you show what is after
> "checking for int32_t" in objs/autoconf.err ?

objs/autotest.c: In function `main':
objs/autotest.c:11: error: `int32_t' undeclared (first use in this function)
objs/autotest.c:11: error: (Each undeclared identifier is reported only once
objs/autotest.c:11: error: for each function it appears in.)
objs/autotest.c:11: error: parse error before "i"
----------

#include <sys/types.h>
#include <signal.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <netinet/in.h>


int main() {
int32_t i = 0;
return 0;
}

Adding '#include <sys/bitypes.h>' lets autotest.c compile.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

On Tue, Apr 27, 2010 at 03:39:25PM -0400, Brian Lewis wrote:

> On Tuesday, 27.04.10 at 22:35, Igor Sysoev wrote:
> > Try the attached patch. It should show found replacements and fail on
> > uintptr_t. Could you show the new ./configure output from
> >
> > checking for int size ... 4 bytes
> > to
> > checking for uintptr_t ...
> >
> > ?
>
> Thank you for the patch. The output is
>
> checking for int size ... 4 bytes
> checking for long size ... 4 bytes
> checking for long long size ... 8 bytes
> checking for void * size ... 4 bytes
> checking for int64_t ... int64_t not found, long long used
> checking for uint64_t ... uint64_t not found u_int64_t not found, unsigned long long used
> checking for int32_t ... int32_t not found, int used
> checking for uint32_t ... uint32_t not found u_int32_t not found, unsigned int used
> checking for sig_atomic_t ... found
> checking for sig_atomic_t size ... 4 bytes
> checking for socklen_t ... socklen_t not found, int used
> checking for in_addr_t ... in_addr_t not found uint32_t not found, unsigned int used
> checking for in_port_t ... in_port_t not found, u_short used
> checking for rlim_t ... found
> checking for uintptr_t ... uintptr_t not found , uint32_t used
>
> ./configure completes successfully. Then, make produces
>
> gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
> -o objs/src/core/nginx.o \
> src/core/nginx.c
> In file included from src/os/unix/ngx_posix_config.h:96,
> from src/core/ngx_config.h:41,
> from src/core/nginx.c:7:
> objs/ngx_auto_config.h:167: warning: redefinition of `int32_t'
> /usr/include/sys/bitypes.h:82: warning: `int32_t' previously declared here

It seems SCO has int32_t. Then could you show what is after
"checking for int32_t" in objs/autoconf.err ?


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

On Tuesday, 27.04.10 at 22:35, Igor Sysoev wrote:
> Try the attached patch. It should show found replacements and fail on
> uintptr_t. Could you show the new ./configure output from
>
> checking for int size ... 4 bytes
> to
> checking for uintptr_t ...
>
> ?

Thank you for the patch. The output is

checking for int size ... 4 bytes
checking for long size ... 4 bytes
checking for long long size ... 8 bytes
checking for void * size ... 4 bytes
checking for int64_t ... int64_t not found, long long used
checking for uint64_t ... uint64_t not found u_int64_t not found, unsigned long long used
checking for int32_t ... int32_t not found, int used
checking for uint32_t ... uint32_t not found u_int32_t not found, unsigned int used
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... socklen_t not found, int used
checking for in_addr_t ... in_addr_t not found uint32_t not found, unsigned int used
checking for in_port_t ... in_port_t not found, u_short used
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t not found , uint32_t used

./configure completes successfully. Then, make produces

gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
-o objs/src/core/nginx.o \
src/core/nginx.c
In file included from src/os/unix/ngx_posix_config.h:96,
from src/core/ngx_config.h:41,
from src/core/nginx.c:7:
objs/ngx_auto_config.h:167: warning: redefinition of `int32_t'
/usr/include/sys/bitypes.h:82: warning: `int32_t' previously declared here

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

Index: auto/unix
===================================================================
--- auto/unix (revision 2825)
+++ auto/unix (working copy)
@@ -30,17 +30,22 @@
;;
esac

-ngx_type="uint64_t"; ngx_types="u_int64_t"; . auto/types/typedef
+ngx_type="int64_t"; ngx_types="long long"; . auto/types/typedef
+ngx_type="uint64_t"; ngx_types="u_int64_t:unsigned long long"
+. auto/types/typedef

+ngx_type="int32_t"; ngx_types="int"; . auto/types/typedef
+ngx_type="uint32_t"; ngx_types="u_int32_t:unsigned int"; . auto/types/typedef
+
ngx_type="sig_atomic_t"; ngx_types="int"; . auto/types/typedef
. auto/types/sizeof
ngx_param=NGX_SIG_ATOMIC_T_SIZE; ngx_value=$ngx_size; . auto/types/value

ngx_type="socklen_t"; ngx_types="int"; . auto/types/typedef

-ngx_type="in_addr_t"; ngx_types="uint32_t"; . auto/types/typedef
+ngx_type="in_addr_t"; ngx_types="uint32_t:unsigned int"; . auto/types/typedef

-ngx_type="in_port_t"; ngx_types="u_short"; . auto/types/typedef
+ngx_type="in_port_t"; ngx_types="u_short:unsigned short"; . auto/types/typedef

ngx_type="rlim_t"; ngx_types="int"; . auto/types/typedef

Index: auto/types/typedef
===================================================================
--- auto/types/typedef (revision 2825)
+++ auto/types/typedef (working copy)
@@ -12,6 +12,8 @@
END

ngx_found=no
+ngx_ifs=$IFS
+IFS=:

for ngx_try in $ngx_type $ngx_types
do
@@ -74,3 +76,5 @@
if [ $ngx_found != yes ]; then
echo "typedef $ngx_found $ngx_type;" >> $NGX_AUTO_CONFIG_H
fi
+
+IFS=$ngx_ifs
On Tue, Apr 27, 2010 at 01:57:32PM -0400, Brian Lewis wrote:

> On Tuesday, 27.04.10 at 21:50, Igor Sysoev wrote:
> > On Mon, Apr 26, 2010 at 10:08:59AM -0400, Brian Lewis wrote:
> > > A system where I'm trying to build nginx doesn't define a few types
> > > it needs like uint64_t, uint32_t, uintptr_t, etc., anywhere in
> > > /usr/include. What is the proper way to define these missing types
> > > for nginx's configure?
> >
> > It seems there is no way currently to make it right.
> > What is your system ?
>
> The 'uname -a's are
>
> SCO_SV sco5 3.2 5.0.6 i386
> SCO_SV sco6 5 6.0.0 i386

Try the attached patch. It should show found replacements and fail on
uintptr_t. Could you show the new ./configure output from

checking for int size ... 4 bytes
to
checking for uintptr_t ...

?


--
Igor Sysoev
http://sysoev.ru/en/

Re: defining uint64_t, etc., during configure

On Tuesday, 27.04.10 at 21:50, Igor Sysoev wrote:
> On Mon, Apr 26, 2010 at 10:08:59AM -0400, Brian Lewis wrote:
> > A system where I'm trying to build nginx doesn't define a few types
> > it needs like uint64_t, uint32_t, uintptr_t, etc., anywhere in
> > /usr/include. What is the proper way to define these missing types
> > for nginx's configure?
>
> It seems there is no way currently to make it right.
> What is your system ?

The 'uname -a's are

SCO_SV sco5 3.2 5.0.6 i386
SCO_SV sco6 5 6.0.0 i386

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: defining uint64_t, etc., during configure

On Mon, Apr 26, 2010 at 10:08:59AM -0400, Brian Lewis wrote:

> A system where I'm trying to build nginx doesn't define a few types it
> needs like uint64_t, uint32_t, uintptr_t, etc., anywhere in
> /usr/include. What is the proper way to define these missing types for
> nginx's configure?

It seems there is no way currently to make it right.
What is your system ?


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: Nginx Terminates at 71.6 kilobytes

Maybe a nginx feature that should be added is when the temporary cache
directory runs out of space, nginx disable the proxy cache buffer and also
disables gzip encoding.

Shahan

On Tue, 27 Apr 2010 09:11:42 +0200, Joaquin Cuenca Abela
<e98cuenc@gmail.com> wrote:
> The same thing happened to me ~1 year ago, but I didn't reported it.
> When you run out of space, nginx only serves the first
> proxy_buffer_size kb from the response. This was the source of
> corruption of part of my images during a backup done through nginx.
>
> IMO in this case nginx shou
>
> On Tue, Apr 27, 2010 at 3:36 AM, Shahan Khan <contact@shahan.me> wrote:
>> The error wasn't nginx's fault. I the temporary cache directory ran out
>> of
>> space.
>>
>> Thanks,
>>
>> Shahan
>>
>> On Sun, 25 Apr 2010 22:08:40 -0700, Shahan Khan wrote:
>>
>> Hi,
>>
>> I am using the latest development version of nginx (0.8.36) on Debian
>> Lenny
>> x86.
>>
>> For some reason, my nginx installation is not allowing files larger
than
>> 71.6 kilobytes to transfer. A larger file simply just transfers the
first
>> 71.6 kilobytes and then terminates.
>>
>> Any suggestions on what I can do would be helpful.
>>
>> Thank you,
>>
>> Shahan
>>
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://nginx.org/mailman/listinfo/nginx
>>
>>

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Limiting number of connections to upstream servers

Hello,

Currently we use nginx 0.7 in combination with multiple fastcgi backends that process requests dynamically without caching. We'd like to prevent a DOS attack by limiting the number of connections handled simultaneously for each backend.

I'm wondering what the best way is to do this. I'd love to be able to specify the maximum number of open connections for each upstream server individually; that seems to be the most straighforward solution. I couldn't find anything in the docs that would allow one to do this though. There's worker_processes and worker_connections, but they're global to the entire nginx server. Since the server also handles static requests (many more than dynamic fcgi requests), there's little I can do with that.

The other solution I can think of, is by having the fcgi backend processes monitor the number of connections they're handling. That has the drawback that each type of backend process must be able to do this. Also, I imagine it could happen that one backend would refuse to handle a connection, while another backend still had some open slots. Nginx itself could handle that better.

How should this best be resolved?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,79962,79962#msg-79962


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: problem with phpmyadmin

Edho, that was one part of the problem, thank you.

However I cannot get logged in phpmyadmin... When I enter user and
password the login page reloads again with no error message.

I have double checked that password is correct.

Edho P Arief wrote:
> On Tue, Apr 27, 2010 at 7:01 PM, Rafa Pedroche <lists@ruby-forum.com>
> wrote:
>> properly."
>>
>
> check php temporary/session directory availability and permission.
> Also make sure you have the required extensions.
>
>
> --
> O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Updating version on Debian Etch (4.0)

I have nginx 0.5.32 running on a very busy server under Debian Etch. I'd
like to update this at least to version 0.6.35 (which I have running on
another server, under Ubuntu 9.04), and I'd like to make the update
process as undisruptive as possible, with minimal downtime. I want to
maintain the layout of conf files, logs, etc. Is there some way I can
use the .deb package from Lenny, or do I have to build from source? Any
suggestions on smoothing the path would be most welcome.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Updating version on Debian Etch (4.0)

I have nginx 0.5.32 running on a very busy server under Debian Etch. I'd
like to update this at least to version 0.6.35 (which I have running on
another server, under Ubuntu 9.04), and I'd like to make the update
process as undisruptive as possible, with minimal downtime. I want to
maintain the layout of conf files, logs, etc. Is there some way I can
use the .deb package from Lenny, or do I have to build from source? Any
suggestions on smoothing the path would be most welcome.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

Re: problem with phpmyadmin

On Tue, Apr 27, 2010 at 7:01 PM, Rafa Pedroche <lists@ruby-forum.com> wrote:
> Hi all,
>
> I have read all the topics in the forum related with problems
> nginx<->phpmyadmin but I cannot fix this ...
>
> PHP works ok (phpinfo test working) but when access phpmyadmin I get the
> following error:
>
> "Error: Cannot start session without errors please check errors given in
> your PHP and For webserver log file and configure your PHP installation
> properly."
>

check php temporary/session directory availability and permission.
Also make sure you have the required extensions.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

problem with phpmyadmin

Hi all,

I have read all the topics in the forum related with problems
nginx<->phpmyadmin but I cannot fix this ...

PHP works ok (phpinfo test working) but when access phpmyadmin I get the
following error:

"Error: Cannot start session without errors please check errors given in
your PHP and For webserver log file and configure your PHP installation
properly."

I have instaled phpmyadmin o


PHPMYADMIN.conf:

server {

listen *:80;

server_name www.testdomain.com;

access_log /usr/local/nginx/logs/phpmyadmin.access_log;
error_log /usr/local/nginx/logs/phpmyadmin.error_log;


location / {
root /var/www/html/PHPMYADMIN;
index index.php;

# if file exists return it right away
if (-f $request_filename) {
break;
}

# otherwise rewrite the fucker
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php$1 last;
break;
}

}

location ~ .php$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME
/var/www/html/PHPMYADMIN$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
}

}


NGINX.conf:

user nginx;
worker_processes 6;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 10 10;

# gzip on;
# gzip_comp_level 1;
# gzip_proxied any;
# gzip_types text/plain text/html text/css application/x-javascript
text/xml application/xml application/xml+rss text/javascript;


gzip on;
gzip_proxied any;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
gzip_http_version 1.1;
gzip_min_length 10;
gzip_comp_level 9;
gzip_types text/plain application/xhtml+xml text/xml application/xml
application/xml+rss text/css application/x-javascript text/javascript;

log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent "$http_referer"
'
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx_access.log main;

error_log /var/log/nginx_error.log debug;

include /usr/local/nginx/sites-enabled/*;


What's wrong? Thank you in advance.

R.P.
--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx