Re: What kind of problems will happen to nginx when updated from centos 6 to 7 ?

2018-02-20 Thread Lucas Rolff
You do not update from CentOS 6 to CentOS 7 – you install a new server – so 
you’ll have proper time to perform tests on a new box.

On 21/02/2018, 08.51, "nginx on behalf of mslee"  wrote:

Hello.

I prepare for migrate from centos 6 to 7 on my servers.
My servers is now providing web services to people. It must that there no
happen any problems to nginx when update from centos 6 to 7.
I've been trying to see if there are any of these cases, but I haven't see
anything yet.

If anyone's ever had a problem, let me know.

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

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


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

What kind of problems will happen to nginx when updated from centos 6 to 7 ?

2018-02-20 Thread mslee
Hello.

I prepare for migrate from centos 6 to 7 on my servers.
My servers is now providing web services to people. It must that there no
happen any problems to nginx when update from centos 6 to 7.
I've been trying to see if there are any of these cases, but I haven't see
anything yet.

If anyone's ever had a problem, let me know.

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

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


Re: nginx/1.13.9 + njs/head build : ngx_http_js_module.so: undefined symbol

2018-02-20 Thread Dmitry Volyntsev


> On 21 Feb 2018, at 00:32, PGNet Dev  wrote:
> 
> On 2/20/18 1:26 PM, Dmitry Volyntsev wrote:
>> Thank you for reporting the problem.
>> Please, make sure that you do 'make clean’ in njs directory after hg update.
> 
> 
> Of course.  I'm always
> 
>  hg update --clean tip
> 
> r450 is reproducibly causing the error.
> 
> r446 is fine atm.

I cannot reproduce it with a clean build (ubuntu 14.04, macOS 10.13).

Can you reproduce the issue from scratch (downloading nginx tip & njs tip in a 
separate directory)?

Somehow your ngx_http_js_module.so is linked against outdated libnjs.a.

On r450 you should see the following:

objdump -t ../njs/build/libnjs.a  | grep -E 'g.*njs_vm_'
021e g F .text  026d njs_vm_create
0040 g O .data.rel.ro.local 0038 .hidden 
njs_vm_mem_cache_pool_proto
048b g F .text  0015 njs_vm_destroy
04a0 g F .text  015c njs_vm_compile
05fc g F .text  01c8 njs_vm_clone
07c4 g F .text  0072 njs_vm_call
0836 g F .text  0051 njs_vm_run
0887 g F .text  0004 njs_vm_retval
088b g F .text  000f njs_vm_retval_set
089a g F .text  0035 njs_vm_retval_to_ext_string
2c0c g F .text  001c .hidden njs_vm_backtrace
2c28 g F .text  02fb njs_vm_value_to_ext_string
0384 g F .text  001d njs_vm_external_prototype
03a1 g F .text  0077 njs_vm_external_create
0418 g F .text  00a6 njs_vm_external_bind
0803 g F .text  0083 njs_vm_function
0b8d g F .text  04c8 njs_vm_completions

nm ./objs/ngx_http_js_module.so | grep -E 'T.*njs_vm_'
b1f9 T njs_vm_call
b031 T njs_vm_clone
aed5 T njs_vm_compile
00019c4d T njs_vm_completions
ac53 T njs_vm_create
aec0 T njs_vm_destroy
00018698 T njs_vm_external_bind
00018621 T njs_vm_external_create
00018604 T njs_vm_external_prototype
0001903d T njs_vm_function
b2bc T njs_vm_retval
b2c0 T njs_vm_retval_set
b2cf T njs_vm_retval_to_ext_string
b26b T njs_vm_run
df38 T njs_vm_value_to_ext_string

___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Re: DTLS patches

2018-02-20 Thread Wang Shanker
Hi, Vladimir

`ngx_stream_ssl_init_connection` trys to set tcp_nodelay on the given 
connection. 
The following patch adds a test for the type of connection before set.

Cheers,

Miao Wang

diff --git a/src/stream/ngx_stream_ssl_module.c 
b/src/stream/ngx_stream_ssl_module.c
index f85bbb6..36f7fdd 100644
--- a/src/stream/ngx_stream_ssl_module.c
+++ b/src/stream/ngx_stream_ssl_module.c
@@ -369,7 +369,7 @@ ngx_stream_ssl_init_connection(ngx_ssl_t *ssl, 
ngx_connection_t *c)

cscf = ngx_stream_get_module_srv_conf(s, ngx_stream_core_module);

-if (cscf->tcp_nodelay && ngx_tcp_nodelay(c) != NGX_OK) {
+if (cscf->tcp_nodelay && c->type == SOCK_STREAM && ngx_tcp_nodelay(c) != 
NGX_OK) {
return NGX_ERROR;
}



> Hello all,
> 
> For all those interested in testing DTLS support, experimental patch
> is now available at 
> http://nginx.org/patches/dtls/
> 
> 
> Check the README.txt for details .
> 
> If you have any feedback, please report to this thread.
> 

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


Re: nginx/1.13.9 + njs/head build : ngx_http_js_module.so: undefined symbol

2018-02-20 Thread PGNet Dev

On 2/20/18 1:26 PM, Dmitry Volyntsev wrote:

Thank you for reporting the problem.

Please, make sure that you do 'make clean’ in njs directory after hg update.




Of course.  I'm always

  hg update --clean tip

r450 is reproducibly causing the error.

r446 is fine atm.
___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Re: nginx/1.13.9 + njs/head build : ngx_http_js_module.so: undefined symbol

2018-02-20 Thread Dmitry Volyntsev
Thank you for reporting the problem. 

Please, make sure that you do 'make clean’ in njs directory after hg update.


> On 20 Feb 2018, at 22:41, PGNet Dev  wrote:
> 
> Upgrading nginx 1.13.8 -> 1.13.9 with usual
> 
>   ./configure \
>   ... \
>   --add-dynamic-module=/usr/local/src/njs/nginx
> 
> and
> 
>   cd /usr/local/src/njs/nginx
>   hg log | head
>   changeset:   450:757271547b56
>   tag: tip
>   user:Dmitry Volyntsev 
>   date:Tue Feb 20 19:12:55 2018 +0300
>   summary: Fixed the names of global functions in backtraces.
> 
>   ls -al /usr/local/src/njs/nginx
>   total 76K
>   drwxr-xr-x 2 root root 4.0K Feb 20 11:31 ./
>   drwxr-xr-x 6 root root 4.0K Feb 20 11:31 ../
>   -rw-r--r-- 1 root root  749 Feb 20 11:31 config
>   -rw-r--r-- 1 root root  260 Feb 20 11:31 config.make
>   -rw-r--r-- 1 root root  32K Feb 20 11:31 ngx_http_js_module.c
>   -rw-r--r-- 1 root root  26K Feb 20 11:31 ngx_stream_js_module.c
> 
> No errors on build, but on conf check
> 
>   /usr/local/sbin/nginx -t -c /usr/local/etc/nginx/nginx.conf
>   nginx: [emerg] dlopen() 
> "/usr/local/nginx-modules/ngx_http_js_module.so" failed 
> (/usr/local/nginx-modules/ngx_http_js_module.so: undefined symbol: 
> njs_vm_value_to_ext_string) in /usr/local/etc/nginx/nginx.conf:34
>   nginx: configuration file /usr/local/etc/nginx/nginx.conf test 
> failed
> 
> where, line 34's
> 
>   load_module /usr/local/nginx-modules/ngx_http_js_module.so;
> 
> and
> 
>   ls -al /usr/local/nginx-modules/ngx_http_js_module.so
>   -rwxr-xr-x 1 root root 1.3M Feb 20 11:26 
> /usr/local/nginx-modules/ngx_http_js_module.so*
>   ldd /usr/local/nginx-modules/ngx_http_js_module.so
>linux-vdso.so.1 (0x7ffef8db5000)
>libssl.so.1.1 => /usr/local/openssl11/lib64/libssl.so.1.1 
> (0x7f8822d18000)
>libcrypto.so.1.1 => /usr/local/openssl11/lib64/libcrypto.so.1.1 
> (0x7f882286e000)
>libdl.so.2 => /lib64/libdl.so.2 (0x7f882266a000)
>libz.so.1 => /lib64/libz.so.1 (0x7f8822453000)
>libpcre.so.1 => /usr/local/lib64/libpcre.so.1 (0x7f88221dc000)
>libpcrecpp.so.0 => /usr/local/lib64/libpcrecpp.so.0 
> (0x7f8821fd2000)
>libm.so.6 => /lib64/libm.so.6 (0x7f8821cd5000)
>libc.so.6 => /lib64/libc.so.6 (0x7f8821934000)
>libpthread.so.0 => /lib64/libpthread.so.0 (0x7f8821717000)
>/lib64/ld-linux-x86-64.so.2 (0x7f88231d7000)
>libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x7f882139)
>libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x7f8821179000)
> 
>   nm /usr/local/nginx-modules/ngx_http_js_module.so | grep "U njs"
>   U njs_vm_external_create
>   U njs_vm_external_prototype
>   U njs_vm_retval_to_ext_string
>   U njs_vm_value_to_ext_string

___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Re: Fwd: Question about wildcard nginx entry.

2018-02-20 Thread bukow bukowiec
I am sorry looks like i missunderstood some basics concepts of nginx.
Sorry again, my bad.

Thank you for nginx and best regards!

On Tue, Feb 20, 2018 at 9:02 AM, Francis Daly  wrote:

> On Mon, Feb 19, 2018 at 09:55:25PM +0100, bukow bukowiec wrote:
>
> Hi there,
>
> > Anyway, can anyone tell me why nginx does not support wildcard type like:
> >
> > "*.domain.tld" ?
>
> Why do you think that nginx does not support that?
>
> Can you show a configuration that tries to use it but fails?
>
> In the context of server_name, the documentation is at
> http://nginx.org/r/server_name
>
> f
> --
> Francis Dalyfran...@daoine.org
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: nginx/1.13.9 + njs/head build : ngx_http_js_module.so: undefined symbol

2018-02-20 Thread PGNet Dev

On 2/20/18 11:41 AM, PGNet Dev wrote:

cd /usr/local/src/njs/nginx
hg log | head
changeset:   450:757271547b56
tag: tip
user:Dmitry Volyntsev 
date:Tue Feb 20 19:12:55 2018 +0300
summary: Fixed the names of global functions in backtraces.


fyi, simple revert to

hg revert -r 446 --all

fixes the config check problem, and subsequent nginx build execs as usual




___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


patch for fixing timouts #189

2018-02-20 Thread Felix Ruess
Hi all,

quite a while ago someone else already found the problem that the timeouts
use system time rather than a monotonic clock:
https://trac.nginx.org/nginx/ticket/189

I updated/fixed the patch [1] there a while ago already and have this
successfully deployed on ~50 devices since then.

Any chance to get this included now? Or is there still something missing?

Cheers,
Felix

[1] https://trac.nginx.org/nginx/attachment/ticket/189/
monotonic_timers.2.patch
___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

nginx/1.13.9 + njs/head build : ngx_http_js_module.so: undefined symbol

2018-02-20 Thread PGNet Dev
Upgrading nginx 1.13.8 -> 1.13.9 with usual

./configure \
... \
--add-dynamic-module=/usr/local/src/njs/nginx

and

cd /usr/local/src/njs/nginx
hg log | head
changeset:   450:757271547b56
tag: tip
user:Dmitry Volyntsev 
date:Tue Feb 20 19:12:55 2018 +0300
summary: Fixed the names of global functions in backtraces.

ls -al /usr/local/src/njs/nginx
total 76K
drwxr-xr-x 2 root root 4.0K Feb 20 11:31 ./
drwxr-xr-x 6 root root 4.0K Feb 20 11:31 ../
-rw-r--r-- 1 root root  749 Feb 20 11:31 config
-rw-r--r-- 1 root root  260 Feb 20 11:31 config.make
-rw-r--r-- 1 root root  32K Feb 20 11:31 ngx_http_js_module.c
-rw-r--r-- 1 root root  26K Feb 20 11:31 ngx_stream_js_module.c

No errors on build, but on conf check

/usr/local/sbin/nginx -t -c /usr/local/etc/nginx/nginx.conf
nginx: [emerg] dlopen() 
"/usr/local/nginx-modules/ngx_http_js_module.so" failed 
(/usr/local/nginx-modules/ngx_http_js_module.so: undefined symbol: 
njs_vm_value_to_ext_string) in /usr/local/etc/nginx/nginx.conf:34
nginx: configuration file /usr/local/etc/nginx/nginx.conf test 
failed

where, line 34's

load_module /usr/local/nginx-modules/ngx_http_js_module.so;

and

ls -al /usr/local/nginx-modules/ngx_http_js_module.so
-rwxr-xr-x 1 root root 1.3M Feb 20 11:26 
/usr/local/nginx-modules/ngx_http_js_module.so*
ldd /usr/local/nginx-modules/ngx_http_js_module.so
linux-vdso.so.1 (0x7ffef8db5000)
libssl.so.1.1 => /usr/local/openssl11/lib64/libssl.so.1.1 
(0x7f8822d18000)
libcrypto.so.1.1 => /usr/local/openssl11/lib64/libcrypto.so.1.1 
(0x7f882286e000)
libdl.so.2 => /lib64/libdl.so.2 (0x7f882266a000)
libz.so.1 => /lib64/libz.so.1 (0x7f8822453000)
libpcre.so.1 => /usr/local/lib64/libpcre.so.1 (0x7f88221dc000)
libpcrecpp.so.0 => /usr/local/lib64/libpcrecpp.so.0 (0x7f8821fd2000)
libm.so.6 => /lib64/libm.so.6 (0x7f8821cd5000)
libc.so.6 => /lib64/libc.so.6 (0x7f8821934000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x7f8821717000)
/lib64/ld-linux-x86-64.so.2 (0x7f88231d7000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x7f882139)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x7f8821179000)

nm /usr/local/nginx-modules/ngx_http_js_module.so | grep "U njs"
U njs_vm_external_create
U njs_vm_external_prototype
U njs_vm_retval_to_ext_string
U njs_vm_value_to_ext_string
___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


Re: [nginx-announce] nginx-1.13.9

2018-02-20 Thread Kevin Worthington
 Hello Nginx users,

Now available: Nginx 1.13.9 for Windows
https://kevinworthington.com/nginxwin1139
(32-bit and 64-bit versions)

These versions are to support legacy users who are already using Cygwin
based builds of Nginx. Officially supported native Windows binaries are at
nginx.org.

Announcements are also available here:
Twitter http://twitter.com/kworthington
Google+ https://plus.google.com/+KevinWorthington/

Thank you,
Kevin
--
Kevin Worthington
kworthington *@* (gmail]  [dot} {com)
https://kevinworthington.com/
https://twitter.com/kworthington
https://plus.google.com/+KevinWorthington/


On Tue, Feb 20, 2018 at 9:25 AM, Maxim Dounin  wrote:

> Changes with nginx 1.13.920 Feb
> 2018
>
> *) Feature: HTTP/2 server push support; the "http2_push" and
>"http2_push_preload" directives.
>
> *) Bugfix: "header already sent" alerts might appear in logs when using
>cache; the bug had appeared in 1.9.13.
>
> *) Bugfix: a segmentation fault might occur in a worker process if the
>"ssl_verify_client" directive was used and no SSL certificate was
>specified in a virtual server.
>
> *) Bugfix: in the ngx_http_v2_module.
>
> *) Bugfix: in the ngx_http_dav_module.
>
>
> --
> Maxim Dounin
> http://nginx.org/
> ___
> nginx-announce mailing list
> nginx-annou...@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-announce
>
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: proxy_bind ipv4 & server ipv6

2018-02-20 Thread Maxim Dounin
Hello!

On Tue, Feb 20, 2018 at 07:16:29PM +0300, kpoxa wrote:

> Добрый день.
> 
> Комбинация proxy_bind на ipv4 адрес с апстримом с адресом ipv6 даёт ошибку
> 
> [crit] 14852#14852: *21 bind(10.0.0.10) failed (22: Invalid argument) while
> connecting to upstream
> 
> Т.к. у адрес сервера резолвился динамически, то ушло полчаса на то, чтобы
> понять где ошибка, возможно более человекопонятная надпись была бы более
> уместна.

Чтобы ловить в том числе такие проблемы - в каждом сообщении об 
ошибке написан ещё и адрес upstream-сервера, к которому пытались 
установить соединение.

-- 
Maxim Dounin
http://mdounin.ru/
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: Странное взаимодействие с uWSGI

2018-02-20 Thread Slawa Olhovchenkov
On Tue, Feb 20, 2018 at 11:11:24AM -0500, VeeSot wrote:

> tcpdump поможет собрать информацию если обмен идет по сокету? Я выше привел
> выдержку из конфига.

можно попробовать через socat.
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

[njs] Externals refactored.

2018-02-20 Thread Dmitry Volyntsev
details:   http://hg.nginx.org/njs/rev/e7bc9d328a20
branches:  
changeset: 448:e7bc9d328a20
user:  Dmitry Volyntsev 
date:  Tue Feb 20 19:12:53 2018 +0300
description:
Externals refactored.

Public API is rectified to allow the creation of external objects in
runtime.
1) njs_vm_external_add() is replaced with njs_vm_external_prototype().
The later functions returns a pointer to a prototype object which can
be used to create a value with such a prototype in runtime.

2) njs_vm_external() is split into njs_vm_external_create() and
njs_vm_external_bind(). The former creates a variable with a specified
prototype and associates it with an external pointer. The latter binds
a variable to a name in the global namespace.

diffstat:

 nginx/ngx_http_js_module.c  |  212 ++---
 nginx/ngx_stream_js_module.c|  176 -
 njs/njs.c   |   75 +++
 njs/njs_builtin.c   |   26 +-
 njs/njs_extern.c|  209 +---
 njs/njs_extern.h|   14 +-
 njs/njs_parser.c|6 +-
 njs/njs_parser.h|3 +-
 njs/njs_vm.c|  168 ++---
 njs/njs_vm.h|   19 +-
 njs/njscript.c  |   71 --
 njs/njscript.h  |   22 +-
 njs/test/njs_benchmark.c|  114 ---
 njs/test/njs_interactive_test.c |   27 +-
 njs/test/njs_unit_test.c|  381 +++
 nxt/nxt_array.h |4 +
 nxt/nxt_lvlhsh.c|4 +-
 nxt/nxt_lvlhsh.h|6 +-
 18 files changed, 800 insertions(+), 737 deletions(-)

diffs (truncated from 2773 to 1000 lines):

diff -r 0a3645d22d22 -r e7bc9d328a20 nginx/ngx_http_js_module.c
--- a/nginx/ngx_http_js_module.cTue Feb 20 19:12:52 2018 +0300
+++ b/nginx/ngx_http_js_module.cTue Feb 20 19:12:53 2018 +0300
@@ -15,37 +15,21 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 
 #include 
 
 
-#define NGX_HTTP_JS_MCP_CLUSTER_SIZE(2 * ngx_pagesize)
-#define NGX_HTTP_JS_MCP_PAGE_ALIGNMENT  128
-#define NGX_HTTP_JS_MCP_PAGE_SIZE   512
-#define NGX_HTTP_JS_MCP_MIN_CHUNK_SIZE  16
-
-
-#define ngx_http_js_create_mem_cache_pool()   \
-nxt_mem_cache_pool_create(_http_js_mem_cache_pool_proto, NULL, NULL,  \
-  NGX_HTTP_JS_MCP_CLUSTER_SIZE,   \
-  NGX_HTTP_JS_MCP_PAGE_ALIGNMENT, \
-  NGX_HTTP_JS_MCP_PAGE_SIZE,  \
-  NGX_HTTP_JS_MCP_MIN_CHUNK_SIZE)
+typedef struct {
+njs_vm_t*vm;
+ngx_str_tcontent;
+const njs_extern_t  *req_proto;
+const njs_extern_t  *res_proto;
+} ngx_http_js_loc_conf_t;
 
 
 typedef struct {
 njs_vm_t*vm;
 njs_opaque_value_t   args[2];
-ngx_str_tcontent;
-} ngx_http_js_loc_conf_t;
-
-
-typedef struct {
-njs_vm_t*vm;
-njs_opaque_value_t  *args;
 } ngx_http_js_ctx_t;
 
 
@@ -59,12 +43,7 @@ static ngx_int_t ngx_http_js_handler(ngx
 static ngx_int_t ngx_http_js_variable(ngx_http_request_t *r,
 ngx_http_variable_value_t *v, uintptr_t data);
 static ngx_int_t ngx_http_js_init_vm(ngx_http_request_t *r);
-static void ngx_http_js_cleanup_mem_cache_pool(void *data);
-
-static void *ngx_http_js_alloc(void *mem, size_t size);
-static void *ngx_http_js_calloc(void *mem, size_t size);
-static void *ngx_http_js_memalign(void *mem, size_t alignment, size_t size);
-static void ngx_http_js_free(void *mem, void *p);
+static void ngx_http_js_cleanup_vm(void *data);
 
 static njs_ret_t ngx_http_js_ext_get_string(njs_vm_t *vm, njs_value_t *value,
 void *obj, uintptr_t data);
@@ -183,17 +162,6 @@ ngx_module_t  ngx_http_js_module = {
 };
 
 
-static const nxt_mem_proto_t  ngx_http_js_mem_cache_pool_proto = {
-ngx_http_js_alloc,
-ngx_http_js_calloc,
-ngx_http_js_memalign,
-NULL,
-ngx_http_js_free,
-NULL,
-NULL,
-};
-
-
 static njs_external_t  ngx_http_js_ext_response[] = {
 
 { nxt_string("headers"),
@@ -284,18 +252,6 @@ static njs_external_t  ngx_http_js_ext_r
 
 static njs_external_t  ngx_http_js_ext_request[] = {
 
-{ nxt_string("response"),
-  NJS_EXTERN_OBJECT,
-  ngx_http_js_ext_response,
-  nxt_nitems(ngx_http_js_ext_response),
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  0 },
-
 { nxt_string("log"),
   NJS_EXTERN_METHOD,
   NULL,
@@ -396,7 +352,7 @@ static njs_external_t  ngx_http_js_ext_r
 
 static njs_external_t  ngx_http_js_externals[] = {
 
-{ nxt_string("$r"),
+{ nxt_string("request"),
   NJS_EXTERN_OBJECT,
   ngx_http_js_ext_request,
   nxt_nitems(ngx_http_js_ext_request),
@@ -407,6 +363,18 @@ static njs_external_t  

[njs] Hiding the unit tests' output under the verbose mode.

2018-02-20 Thread Dmitry Volyntsev
details:   http://hg.nginx.org/njs/rev/18e0275576a3
branches:  
changeset: 449:18e0275576a3
user:  Dmitry Volyntsev 
date:  Tue Feb 20 19:12:53 2018 +0300
description:
Hiding the unit tests' output under the verbose mode.

diffstat:

 Makefile|   2 +-
 njs/test/njs_interactive_test.c |  26 ++
 njs/test/njs_unit_test.c|  25 -
 3 files changed, 39 insertions(+), 14 deletions(-)

diffs (129 lines):

diff -r e7bc9d328a20 -r 18e0275576a3 Makefile
--- a/Makefile  Tue Feb 20 19:12:53 2018 +0300
+++ b/Makefile  Tue Feb 20 19:12:53 2018 +0300
@@ -91,7 +91,7 @@ test: njs_interactive_test \
$(NXT_BUILDDIR)/njs_unit_test \
$(NXT_BUILDDIR)/njs_benchmark \
 
-   $(NXT_BUILDDIR)/njs_unit_test d
+   $(NXT_BUILDDIR)/njs_unit_test
 
 clean:
rm -rf $(NXT_BUILDDIR)
diff -r e7bc9d328a20 -r 18e0275576a3 njs/test/njs_interactive_test.c
--- a/njs/test/njs_interactive_test.c   Tue Feb 20 19:12:53 2018 +0300
+++ b/njs/test/njs_interactive_test.c   Tue Feb 20 19:12:53 2018 +0300
@@ -192,7 +192,7 @@ static njs_interactive_test_t  njs_test[
 
 
 static nxt_int_t
-njs_interactive_test(void)
+njs_interactive_test(nxt_bool_t verbose)
 {
 u_char  *start, *last, *end;
 njs_vm_t*vm;
@@ -210,8 +210,10 @@ njs_interactive_test(void)
 
 test = _test[i];
 
-printf("\"%.*s\"\n", (int) test->script.length, test->script.start);
-fflush(stdout);
+if (verbose) {
+printf("\"%.*s\"\n", (int) test->script.length, 
test->script.start);
+fflush(stdout);
+}
 
 memset(, 0, sizeof(njs_vm_opt_t));
 
@@ -279,5 +281,21 @@ done:
 int nxt_cdecl
 main(int argc, char **argv)
 {
-return njs_interactive_test();
+nxt_bool_t  verbose;
+
+verbose = 0;
+
+if (argc > 1) {
+switch (argv[1][0]) {
+
+case 'v':
+verbose = 1;
+break;
+
+default:
+break;
+}
+}
+
+return njs_interactive_test(verbose);
 }
diff -r e7bc9d328a20 -r 18e0275576a3 njs/test/njs_unit_test.c
--- a/njs/test/njs_unit_test.c  Tue Feb 20 19:12:53 2018 +0300
+++ b/njs/test/njs_unit_test.c  Tue Feb 20 19:12:53 2018 +0300
@@ -9376,7 +9376,7 @@ njs_externals_init(njs_vm_t *vm)
 
 
 static nxt_int_t
-njs_unit_test(nxt_bool_t disassemble)
+njs_unit_test(nxt_bool_t disassemble, nxt_bool_t verbose)
 {
 u_char*start;
 njs_vm_t  *vm, *nvm;
@@ -9401,9 +9401,11 @@ njs_unit_test(nxt_bool_t disassemble)
 
 for (i = 0; i < nxt_nitems(njs_test); i++) {
 
-printf("\"%.*s\"\n",
-   (int) njs_test[i].script.length, njs_test[i].script.start);
-fflush(stdout);
+if (verbose) {
+printf("\"%.*s\"\n",
+   (int) njs_test[i].script.length, njs_test[i].script.start);
+fflush(stdout);
+}
 
 memset(, 0, sizeof(njs_vm_opt_t));
 
@@ -9462,10 +9464,10 @@ njs_unit_test(nxt_bool_t disassemble)
 continue;
 }
 
-printf("njs(\"%.*s\") failed: \"%.*s\" vs \"%.*s\"\n",
+printf("njs(\"%.*s\")\nexpected: \"%.*s\"\n got: \"%.*s\"\n",
(int) njs_test[i].script.length, njs_test[i].script.start,
-   (int) njs_test[i].ret.length, njs_test[i].ret.start,
-   (int) s.length, s.start);
+   (int) s.length, s.start, (int) njs_test[i].ret.length,
+   njs_test[i].ret.start);
 
 goto done;
 }
@@ -9493,9 +9495,10 @@ done:
 int nxt_cdecl
 main(int argc, char **argv)
 {
-nxt_bool_t  disassemble;
+nxt_bool_t  disassemble, verbose;
 
 disassemble = 0;
+verbose = 0;
 
 if (argc > 1) {
 switch (argv[1][0]) {
@@ -9504,10 +9507,14 @@ main(int argc, char **argv)
 disassemble = 1;
 break;
 
+case 'v':
+verbose = 1;
+break;
+
 default:
 break;
 }
 }
 
-return njs_unit_test(disassemble);
+return njs_unit_test(disassemble, verbose);
 }
___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


[njs] Fixed the names of global functions in backtraces.

2018-02-20 Thread Dmitry Volyntsev
details:   http://hg.nginx.org/njs/rev/757271547b56
branches:  
changeset: 450:757271547b56
user:  Dmitry Volyntsev 
date:  Tue Feb 20 19:12:55 2018 +0300
description:
Fixed the names of global functions in backtraces.

Previously, they were reported as 'native (native)'.

diffstat:

 njs/njs_builtin.c   |   92 ---
 njs/njs_extern.c|  102 
 njs/njs_extern.h|4 +
 njs/njs_function.c  |2 +-
 njs/njs_module.c|7 ++
 njs/njs_module.h|1 +
 njs/njs_number.c|   28 ++
 njs/njs_number.h|5 +
 njs/njs_string.c|   35 +
 njs/njs_string.h|6 ++
 njs/njs_vm.c|   12 +++-
 njs/test/njs_expect_test.exp|6 ++
 njs/test/njs_interactive_test.c |   10 +++
 13 files changed, 268 insertions(+), 42 deletions(-)

diffs (463 lines):

diff -r 18e0275576a3 -r 757271547b56 njs/njs_builtin.c
--- a/njs/njs_builtin.c Tue Feb 20 19:12:53 2018 +0300
+++ b/njs/njs_builtin.c Tue Feb 20 19:12:55 2018 +0300
@@ -102,6 +102,38 @@ const njs_object_init_t*njs_construc
 };
 
 
+const njs_object_init_t*njs_function_init[] = {
+_eval_function_init,
+_to_string_function_init,
+_is_nan_function_init,
+_is_finite_function_init,
+_parse_int_function_init,
+_parse_float_function_init,
+_encode_uri_function_init,
+_encode_uri_component_function_init,
+_decode_uri_function_init,
+_decode_uri_component_function_init,
+_require_function_init
+};
+
+
+const njs_function_init_t  njs_native_functions[] = {
+/* SunC does not allow empty array initialization. */
+{ njs_eval_function,   { 0 } },
+{ njs_object_prototype_to_string,  { 0 } },
+{ njs_number_global_is_nan,{ NJS_SKIP_ARG, NJS_NUMBER_ARG } },
+{ njs_number_is_finite,{ NJS_SKIP_ARG, NJS_NUMBER_ARG } },
+{ njs_number_parse_int,
+  { NJS_SKIP_ARG, NJS_STRING_ARG, NJS_INTEGER_ARG } },
+{ njs_number_parse_float,  { NJS_SKIP_ARG, NJS_STRING_ARG } },
+{ njs_string_encode_uri,   { NJS_SKIP_ARG, NJS_STRING_ARG } },
+{ njs_string_encode_uri_component, { NJS_SKIP_ARG, NJS_STRING_ARG } },
+{ njs_string_decode_uri,   { NJS_SKIP_ARG, NJS_STRING_ARG } },
+{ njs_string_decode_uri_component, { NJS_SKIP_ARG, NJS_STRING_ARG } },
+{ njs_module_require,  { NJS_SKIP_ARG, NJS_STRING_ARG } },
+};
+
+
 static njs_ret_t
 njs_prototype_function(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs,
 njs_index_t unused)
@@ -190,36 +222,6 @@ njs_builtin_objects_create(njs_vm_t *vm)
 { njs_memory_error_constructor,  { NJS_SKIP_ARG, NJS_STRING_ARG } },
 };
 
-static const njs_object_init_t*function_init[] = {
-_eval_function_init,  /* eval   */
-NULL, /* toString   */
-NULL, /* isNaN  */
-NULL, /* isFinite   */
-NULL, /* parseInt   */
-NULL, /* parseFloat */
-NULL, /* encodeURI  */
-NULL, /* encodeURIComponent */
-NULL, /* decodeURI  */
-NULL, /* decodeURIComponent */
-NULL, /* require */
-};
-
-static const njs_function_init_t  native_functions[] = {
-/* SunC does not allow empty array initialization. */
-{ njs_eval_function,   { 0 } },
-{ njs_object_prototype_to_string,  { 0 } },
-{ njs_number_global_is_nan,{ NJS_SKIP_ARG, NJS_NUMBER_ARG } },
-{ njs_number_is_finite,{ NJS_SKIP_ARG, NJS_NUMBER_ARG } },
-{ njs_number_parse_int,
-  { NJS_SKIP_ARG, NJS_STRING_ARG, NJS_INTEGER_ARG } },
-{ njs_number_parse_float,  { NJS_SKIP_ARG, NJS_STRING_ARG } },
-{ njs_string_encode_uri,   { NJS_SKIP_ARG, NJS_STRING_ARG } },
-{ njs_string_encode_uri_component, { NJS_SKIP_ARG, NJS_STRING_ARG } },
-{ njs_string_decode_uri,   { NJS_SKIP_ARG, NJS_STRING_ARG } },
-{ njs_string_decode_uri_component, { NJS_SKIP_ARG, NJS_STRING_ARG } },
-{ njs_module_require,  { NJS_SKIP_ARG, NJS_STRING_ARG } },
-};
-
 static const njs_object_prop_tnull_proto_property = {
 .type = NJS_WHITEOUT,
 .name = njs_string("__proto__"),
@@ -293,10 +295,10 @@ njs_builtin_objects_create(njs_vm_t *vm)
 functions = vm->shared->functions;
 
 for (i = NJS_FUNCTION_EVAL; i < NJS_FUNCTION_MAX; i++) {
-if (function_init[i] != NULL) {
+if (njs_function_init[i]->items != 

[njs] Moving long_string fields of njs_value_t into a separate struct.

2018-02-20 Thread Dmitry Volyntsev
details:   http://hg.nginx.org/njs/rev/0a3645d22d22
branches:  
changeset: 447:0a3645d22d22
user:  Dmitry Volyntsev 
date:  Tue Feb 20 19:12:52 2018 +0300
description:
Moving long_string fields of njs_value_t into a separate struct.

diffstat:

 njs/njs_object.c |   4 +-
 njs/njs_string.c |  83 ---
 njs/njs_vm.c |  34 --
 njs/njs_vm.h |  63 +++--
 4 files changed, 97 insertions(+), 87 deletions(-)

diffs (447 lines):

diff -r e12ed0068e57 -r 0a3645d22d22 njs/njs_object.c
--- a/njs/njs_object.c  Mon Feb 12 15:15:53 2018 +0300
+++ b/njs/njs_object.c  Tue Feb 20 19:12:52 2018 +0300
@@ -159,11 +159,11 @@ njs_object_hash_test(nxt_lvlhsh_query_t 
 start = prop->name.short_string.start;
 
 } else {
-if (lhq->key.length != prop->name.data.string_size) {
+if (lhq->key.length != prop->name.long_string.size) {
 return NXT_DECLINED;
 }
 
-start = prop->name.data.u.string->start;
+start = prop->name.long_string.data->start;
 }
 
 if (memcmp(start, lhq->key.start, lhq->key.length) == 0) {
diff -r e12ed0068e57 -r 0a3645d22d22 njs/njs_string.c
--- a/njs/njs_string.c  Mon Feb 12 15:15:53 2018 +0300
+++ b/njs/njs_string.c  Tue Feb 20 19:12:52 2018 +0300
@@ -151,15 +151,15 @@ njs_string_create(njs_vm_t *vm, njs_valu
  */
 value->short_string.size = NJS_STRING_LONG;
 value->short_string.length = 0;
-value->data.external0 = 0xff;
-value->data.string_size = size;
+value->long_string.external = 0xff;
+value->long_string.size = size;
 
 string = nxt_mem_cache_alloc(vm->mem_cache_pool, sizeof(njs_string_t));
 if (nxt_slow_path(string == NULL)) {
 return NXT_ERROR;
 }
 
-value->data.u.string = string;
+value->long_string.data = string;
 
 string->start = start;
 string->length = length;
@@ -210,8 +210,8 @@ njs_string_alloc(njs_vm_t *vm, njs_value
  */
 value->short_string.size = NJS_STRING_LONG;
 value->short_string.length = 0;
-value->data.external0 = 0;
-value->data.string_size = size;
+value->long_string.external = 0;
+value->long_string.size = size;
 
 if (size != length && length > NJS_STRING_MAP_STRIDE) {
 map_offset = njs_string_map_offset(size);
@@ -226,7 +226,7 @@ njs_string_alloc(njs_vm_t *vm, njs_value
  sizeof(njs_string_t) + total);
 
 if (nxt_fast_path(string != NULL)) {
-value->data.u.string = string;
+value->long_string.data = string;
 
 string->start = (u_char *) string + sizeof(njs_string_t);
 string->length = length;
@@ -284,9 +284,9 @@ njs_string_validate(njs_vm_t *vm, njs_st
 }
 
 } else {
-string->start = value->data.u.string->start;
-size = value->data.string_size;
-length = value->data.u.string->length;
+string->start = value->long_string.data->start;
+size = value->long_string.size;
+length = value->long_string.data->length;
 
 if (length == 0 && length != size) {
 length = nxt_utf8_length(string->start, size);
@@ -312,14 +312,14 @@ njs_string_validate(njs_vm_t *vm, njs_st
 
 memcpy(start, string->start, size);
 string->start = start;
-value->data.u.string->start = start;
+value->long_string.data->start = start;
 
 map = (uint32_t *) (start + map_offset);
 map[0] = 0;
 }
 }
 
-value->data.u.string->length = length;
+value->long_string.data->length = length;
 }
 }
 
@@ -343,9 +343,9 @@ njs_string_prop(njs_string_prop_t *strin
 length = value->short_string.length;
 
 } else {
-string->start = value->data.u.string->start;
-size = value->data.string_size;
-length = value->data.u.string->length;
+string->start = value->long_string.data->start;
+size = value->long_string.size;
+length = value->long_string.data->length;
 }
 
 string->size = size;
@@ -454,8 +454,8 @@ njs_string_prototype_length(njs_vm_t *vm
 length = value->short_string.length;
 
 if (size == NJS_STRING_LONG) {
-size = value->data.string_size;
-length = value->data.u.string->length;
+size = value->long_string.size;
+length = value->long_string.data->length;
 }
 
 length = (length == 0) ? size : length;
@@ -486,14 +486,14 @@ njs_string_eq(const njs_value_t *v1, con
 start2 = v2->short_string.start;
 
 } else {
-size = v1->data.string_size;
-
-if (size != v2->data.string_size) {
+size = v1->long_string.size;
+
+if (size != v2->long_string.size) {
 

proxy_bind ipv4 & server ipv6

2018-02-20 Thread kpoxa
Добрый день.

Комбинация proxy_bind на ipv4 адрес с апстримом с адресом ipv6 даёт ошибку

[crit] 14852#14852: *21 bind(10.0.0.10) failed (22: Invalid argument) while
connecting to upstream

Т.к. у адрес сервера резолвился динамически, то ушло полчаса на то, чтобы
понять где ошибка, возможно более человекопонятная надпись была бы более
уместна.


---
Рустам Нарманов.
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: Странное взаимодействие с uWSGI

2018-02-20 Thread VeeSot
tcpdump поможет собрать информацию если обмен идет по сокету? Я выше привел
выдержку из конфига.

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?21,278670,278673#msg-278673

___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: Странное взаимодействие с uWSGI

2018-02-20 Thread VeeSot
Часть конфига что отвечает за работу с uWSGI

upstream yml {
ip_hash;
server unix:/tmp/imi3-yml.sock;
}


location /my_urll/ {
include uwsgi_params;
uwsgi_intercept_errors on;
uwsgi_read_timeout 600;
uwsgi_pass yml;

 }

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?21,278670,278671#msg-278671

___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: Странное взаимодействие с uWSGI

2018-02-20 Thread Slawa Olhovchenkov
On Tue, Feb 20, 2018 at 10:49:19AM -0500, VeeSot wrote:

> Тут интересная сиутация второй день подряд, может подскажешь шо..
> 
> Есть  сервис, который отдает зип-файлики. Перва собирает ХМЛ-ку потом
> заворачивает в зип и потом отдает.
> Поверх сервиса работает uWSGI.Обеспечивает некую многопоточность.
> Поверх всего этого добра - работает NGINX.
> 
> И в половине случаев - всё хорошо,файлики доходят до потребителя(в нашем
> случае робот Яндекс.Маркета).
> Но в другой половине случаев - uWSGI отдает файлик размером 2мб, на nginx -
> уже отдает файлик размером в несколько КБ.И причем отдает не сразу, а через
> некоторое время.
> 
> В логах uWSGI вижу что он передает то что ожидается, в логах NGINX - пустое
> тело ответа.
> 
> Косяк где то на уровне их сопряжения... но хде?? Всё облазил, всё покрутил.
> Сбоит без всякой очевидной причины. Может  отработать три запроса нормально,
> а на четвертый вернуть пустоту.
> 
> Пример логирования с подключеным lua
> 
> 5.45.235.119 - - [20/Feb/2018:20:40:20 +0500] "GET /my_url/1/ HTTP/1.1" 200
> 15941 "-" "YandexMarket/1.9-2 (compatible; http://market.yandex.ru)" 94.683
> <"-" >""
> 5.45.235.73 - - [20/Feb/2018:20:42:11 +0500] "GET /my_url/2/ HTTP/1.1" 200
> 15938 "-" "YandexMarket/1.9-2 (compatible; http://market.yandex.ru)" 104.958
> <"-" >""
> 
> в то же время в uWSGI
> 
> [pid: 6261|app: 0|req: 36/88] 5.45.235.119 () {36 vars in 467 bytes} [Tue
> Feb 20 20:38:45 2018] GET /my_url/1/  => generated 1605423 bytes in 34680
> msecs (HTTP/1.1 200) 5 headers in 308 bytes (8 switches on core 0)
> 
> [pid: 6261|app: 0|req: 37/90] 5.45.235.73 () {36 vars in 464 bytes} [Tue Feb
> 20 20:40:26 2018] GET  /my_url/2/  => generated 2030314 bytes in 44940 msecs
> (HTTP/1.1 200) 5 headers in 311 bytes (10 switches on core 2)

зачем думать, если можно трясти? оно же повторяется?
tcpdumpом записать и потом смотреть, например в вайршарке.
писать лучше с обоих концов сразу.
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Странное взаимодействие с uWSGI

2018-02-20 Thread VeeSot
Тут интересная сиутация второй день подряд, может подскажешь шо..

Есть  сервис, который отдает зип-файлики. Перва собирает ХМЛ-ку потом
заворачивает в зип и потом отдает.
Поверх сервиса работает uWSGI.Обеспечивает некую многопоточность.
Поверх всего этого добра - работает NGINX.

И в половине случаев - всё хорошо,файлики доходят до потребителя(в нашем
случае робот Яндекс.Маркета).
Но в другой половине случаев - uWSGI отдает файлик размером 2мб, на nginx -
уже отдает файлик размером в несколько КБ.И причем отдает не сразу, а через
некоторое время.

В логах uWSGI вижу что он передает то что ожидается, в логах NGINX - пустое
тело ответа.

Косяк где то на уровне их сопряжения... но хде?? Всё облазил, всё покрутил.
Сбоит без всякой очевидной причины. Может  отработать три запроса нормально,
а на четвертый вернуть пустоту.

Пример логирования с подключеным lua

5.45.235.119 - - [20/Feb/2018:20:40:20 +0500] "GET /my_url/1/ HTTP/1.1" 200
15941 "-" "YandexMarket/1.9-2 (compatible; http://market.yandex.ru)" 94.683
<"-" >""
5.45.235.73 - - [20/Feb/2018:20:42:11 +0500] "GET /my_url/2/ HTTP/1.1" 200
15938 "-" "YandexMarket/1.9-2 (compatible; http://market.yandex.ru)" 104.958
<"-" >""

в то же время в uWSGI

[pid: 6261|app: 0|req: 36/88] 5.45.235.119 () {36 vars in 467 bytes} [Tue
Feb 20 20:38:45 2018] GET /my_url/1/  => generated 1605423 bytes in 34680
msecs (HTTP/1.1 200) 5 headers in 308 bytes (8 switches on core 0)

[pid: 6261|app: 0|req: 37/90] 5.45.235.73 () {36 vars in 464 bytes} [Tue Feb
20 20:40:26 2018] GET  /my_url/2/  => generated 2030314 bytes in 44940 msecs
(HTTP/1.1 200) 5 headers in 311 bytes (10 switches on core 2)

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?21,278670,278670#msg-278670

___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

[nginx-ru-announce] nginx-1.13.9

2018-02-20 Thread Maxim Dounin
Изменения в nginx 1.13.9  20.02.2018

*) Добавление: поддержка HTTP/2 server push; директивы http2_push и
   http2_push_preload.

*) Исправление: при использовании кэша в логах могли появляться
   сообщения "header already sent"; ошибка появилась в 1.9.13.

*) Исправление: при использовании директивы ssl_verify_client в рабочем
   процессе мог произойти segmentation fault, если в виртуальном сервере
   не был указан SSL-сертификат.

*) Исправление: в модуле ngx_http_v2_module.

*) Исправление: в модуле ngx_http_dav_module.


-- 
Maxim Dounin
http://nginx.org/
___
nginx-ru-announce mailing list
nginx-ru-announce@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru-announce

[nginx-announce] nginx-1.13.9

2018-02-20 Thread Maxim Dounin
Changes with nginx 1.13.920 Feb 2018

*) Feature: HTTP/2 server push support; the "http2_push" and
   "http2_push_preload" directives.

*) Bugfix: "header already sent" alerts might appear in logs when using
   cache; the bug had appeared in 1.9.13.

*) Bugfix: a segmentation fault might occur in a worker process if the
   "ssl_verify_client" directive was used and no SSL certificate was
   specified in a virtual server.

*) Bugfix: in the ngx_http_v2_module.

*) Bugfix: in the ngx_http_dav_module.


-- 
Maxim Dounin
http://nginx.org/
___
nginx-announce mailing list
nginx-announce@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-announce


nginx-1.13.9

2018-02-20 Thread Maxim Dounin
Изменения в nginx 1.13.9  20.02.2018

*) Добавление: поддержка HTTP/2 server push; директивы http2_push и
   http2_push_preload.

*) Исправление: при использовании кэша в логах могли появляться
   сообщения "header already sent"; ошибка появилась в 1.9.13.

*) Исправление: при использовании директивы ssl_verify_client в рабочем
   процессе мог произойти segmentation fault, если в виртуальном сервере
   не был указан SSL-сертификат.

*) Исправление: в модуле ngx_http_v2_module.

*) Исправление: в модуле ngx_http_dav_module.


-- 
Maxim Dounin
http://nginx.org/
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

nginx-1.13.9

2018-02-20 Thread Maxim Dounin
Changes with nginx 1.13.920 Feb 2018

*) Feature: HTTP/2 server push support; the "http2_push" and
   "http2_push_preload" directives.

*) Bugfix: "header already sent" alerts might appear in logs when using
   cache; the bug had appeared in 1.9.13.

*) Bugfix: a segmentation fault might occur in a worker process if the
   "ssl_verify_client" directive was used and no SSL certificate was
   specified in a virtual server.

*) Bugfix: in the ngx_http_v2_module.

*) Bugfix: in the ngx_http_dav_module.


-- 
Maxim Dounin
http://nginx.org/
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


[nginx] release-1.13.9 tag

2018-02-20 Thread Maxim Dounin
details:   http://hg.nginx.org/nginx/rev/c91356fdd802
branches:  
changeset: 7211:c91356fdd802
user:  Maxim Dounin 
date:  Tue Feb 20 17:08:49 2018 +0300
description:
release-1.13.9 tag

diffstat:

 .hgtags |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (8 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -421,3 +421,4 @@ 0d45b4cf7c2e4e626a5a16e1fe604402ace1cea5
 f87da7d9ca02b8ced4caa6c5eb9013ccd47b0117 release-1.13.6
 47cca243d0ed39bf5dcb9859184affc958b79b6f release-1.13.7
 20ca4bcff108d3e66977f4d97508637093492287 release-1.13.8
+fb1212c7eca4c5328fe17d6cd95b010c67336aac release-1.13.9
___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


[nginx] nginx-1.13.9-RELEASE

2018-02-20 Thread Maxim Dounin
details:   http://hg.nginx.org/nginx/rev/fb1212c7eca4
branches:  
changeset: 7210:fb1212c7eca4
user:  Maxim Dounin 
date:  Tue Feb 20 17:08:48 2018 +0300
description:
nginx-1.13.9-RELEASE

diffstat:

 docs/xml/nginx/changes.xml |  60 ++
 1 files changed, 60 insertions(+), 0 deletions(-)

diffs (70 lines):

diff --git a/docs/xml/nginx/changes.xml b/docs/xml/nginx/changes.xml
--- a/docs/xml/nginx/changes.xml
+++ b/docs/xml/nginx/changes.xml
@@ -5,6 +5,66 @@
 
 
 
+
+
+
+
+поддержка HTTP/2 server push;
+директивы http2_push и http2_push_preload.
+
+
+HTTP/2 server push support;
+the "http2_push" and "http2_push_preload" directives.
+
+
+
+
+
+при использовании кэша
+в логах могли появляться сообщения "header already sent";
+ошибка появилась в 1.9.13.
+
+
+"header already sent" alerts might appear in logs
+when using cache;
+the bug had appeared in 1.9.13.
+
+
+
+
+
+при использовании директивы ssl_verify_client
+в рабочем процессе мог произойти segmentation fault,
+если в виртуальном сервере не был указан SSL-сертификат.
+
+
+a segmentation fault might occur in a worker process
+if the "ssl_verify_client" directive was used
+and no SSL certificate was specified in a virtual server.
+
+
+
+
+
+в модуле ngx_http_v2_module.
+
+
+in the ngx_http_v2_module.
+
+
+
+
+
+в модуле ngx_http_dav_module.
+
+
+in the ngx_http_dav_module.
+
+
+
+
+
+
 
 
 
___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Re: Optimizing nginx mail proxy

2018-02-20 Thread Maxim Dounin
Hello!

On Tue, Feb 20, 2018 at 02:56:40AM -0500, Azusa Taroura wrote:

> I’m trying to optimize mail-proxy. 
> My performance test is 1 client sends many request to 1 nginx server.

[...]

> Low cpu usage, but the performance result is not good.
> Do yoy know how to take full advantage of nginx?

It is not clear what do you mean by "request", as there are no 
requests in SMTP, and what do you mean by "performance result".

In general, there is no need to optimize anything in nginx mail 
proxy except very basic things like worker_connections and 
ssl_session_cache if you use SSL.  Most critical parts from 
performance point of view are your auth_http backend and your SMTP 
backend.

-- 
Maxim Dounin
http://mdounin.ru/
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: Optimizing nginx mail proxy

2018-02-20 Thread Alex Samad
Silly question why not use postfix for this ?


On 20 February 2018 at 18:56, Azusa Taroura 
wrote:

> Hi everyone,
>
> I’m trying to optimize mail-proxy.
> My performance test is 1 client sends many request to 1 nginx server.
>
>
> This is my current settings:
>
> worker_processes auto;
> worker_rlimit_nofile  10;
>
> #error_log  /var/log/nginx/error.log debug;
> #error_log  /var/log/nginx/error.log warn;
> error_log /var/log/nginx/error.log crit;
> events {
>   worker_connections 1024;
>   #worker_connections 4000;
>   #multi_accept on;
>   #use epoll;
> }
>
> mail {
>   auth_http localhost:80/auth/smtp;
>   proxy_pass_error_message on;
>   proxy on;
>   smtp_auth login plain;
>   xclient   on;
>   server {
>   listen25;
>   protocol  smtp;
>   }
>   server {
>   listen465;
>   protocol  smtp;
>   ssl   on;
>   ssl_certificate  /etc/nginx/ssl/server.crt;
>   ssl_certificate_key  /etc/nginx/ssl/server.key;
>
>   ssl_session_cache shared:SSL:20m;
>   ssl_session_timeout 180m;
>
>   #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
>   #ssl_prefer_server_ciphers on;
>   #ssl_ciphers
> ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DHE+AES128:!ADH:!AECDH:!MD5;
>   #ssl_dhparam /etc/nginx/cert/dhparam.pem;
>   #ssl_stapling on;
>   #ssl_stapling_verify on;
>   #ssl_trusted_certificate /etc/nginx/cert/trustchain.crt;
>   #resolver 8.8.8.8 8.8.4.4;
>   }
> }
>
>
> Question>>
> Low cpu usage, but the performance result is not good.
> Do yoy know how to take full advantage of nginx?
>
> Thank you for your time.
> Azusa Taroura
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?2,278656,278656#msg-278656
>
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: Fwd: Question about wildcard nginx entry.

2018-02-20 Thread Francis Daly
On Mon, Feb 19, 2018 at 09:55:25PM +0100, bukow bukowiec wrote:

Hi there,

> Anyway, can anyone tell me why nginx does not support wildcard type like:
> 
> "*.domain.tld" ?

Why do you think that nginx does not support that?

Can you show a configuration that tries to use it but fails?

In the context of server_name, the documentation is at
http://nginx.org/r/server_name

f
-- 
Francis Dalyfran...@daoine.org
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx