Hi
First time trying aio threads on linux, and I am getting this error
[emerg] 19909#0: unknown directive “thread_pool” in
/usr/local/nginx/conf/nginx.conf:7
Line7 reads:
thread_pool testpool threads=64 max_queue=65536;
Everything indicates it was built --with-threads, so I’m not sure where
to go from here
nginx -V:
/usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.9.1 built by gcc 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
configure arguments: --with-debug --with-file-aio --with-threads
from configure output:
Configuration summary
Any help appreciated
Thanks
Richard
Hi Richard,
Do you have an Ubuntu package for Nginx installed also (usually
installed in /usr/sbin)? Depending on how you are starting it the wrong
executable may be being used.
Kind Regards
Andrew
Everything indicates it was built --with-threads, so I’m not sure where to go
from here
Thanks
Richard
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx
–
Andrew H. (LinuxJedi)
Senior Developer Advocate
Nginx Inc.
Thanks Andrew
I figured this out but it was not a duplicate binary
It was because I was issuing -HUP to reload nginx rather than proper
start/stop :-[
Cheers
Richard
Ah! That was my next guess. I’m glad you sorted it. If you have this
problem again there is a way to do a rolling upgrade without a
start/stop, see this link for more info:
http://nginx.org/en/docs/control.html#upgrade
Kind Regards
Andrew
Hi Richard,
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx
–
Andrew H. (LinuxJedi)
Senior Developer Advocate
Nginx Inc.
Добрый день.
Не понятно мне, куда помещать настройку по пулам.
uname -orm
FreeBSD 10.1-RELEASE-p12 amd64
nginx -v
nginx version: nginx/1.8.0
nginx собран с оцией --with-threads
Далее.
nginx.conf в секцию http добавил:
thread_pool one threads=32;
thread_pool cen threads=32;
После делаю проверку.
nginx -t
nginx: [emerg] “thread_pool” directive is not allowed here in
/usr/local/etc/nginx/nginx.conf:46
nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
Как в инструкиях сказано, что в секцию http добавляется настройка по
пулам,
а после проверки конфига мне говорится, что опции theread_pool тут не
место.
Как быть в этом случае.
Хочу реализовать отдачу картинок на обном из нагруженных проектов.
И есть ли смысл использовать пулы от nginx на системе FreeBSD 10.1 ?
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,259166,259836#msg-259836
I am not sure you need threads with freebsd because it has native aio
support.
2015-06-24 15:11 GMT+03:00 bagas [email protected]:
То-есть, на системе FreeBSD смысла нет использовать пул потоков от
nginx?
Про пул от nginx мало информации и примерров.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,259166,259845#msg-259845
http://serverfault.com/questions/476765/how-do-i-enable-aio-on-nginx-on-freebsd
Just add ‘aio on;’ instead of ‘aio threads;’.
Also you should compile nginx without threads.
2015-06-24 16:32 GMT+03:00 bagas [email protected]:
У меня aio работает, оно помоему по умолчанию до 1,9 ветки.
Я прописывал в локейшены свои aio threads; но это стандартно, хотелось
для
каждого проекта сделать свой пул.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,259166,259851#msg-259851
On Wed, Jun 24, 2015 at 08:11:28AM -0400, bagas wrote:
Добрый день.
“unknown directive” != “directive is not allowed here”
Не понятно мне, куда помещать настройку по пулам.
http://nginx.org/ru/docs/ngx_core_module.html#thread_pool
“”"
Контекст: main
“”"
nginx.conf:
==
thread_pool …;
events {
}
http {
server {
}
}
f
Francis D. [email protected]
Hi Francis,
it seems that you start to learn Russian! 
On 6/24/15 6:36 PM, Francis D. wrote:
Контекст: main
}
}
f
Valentin wrote a good blog post about threads:
http://nginx.com/blog/thread-pools-boost-performance-9x/
There is a complete and simple configuration in the “Configuring
Thread Pools” section, near the end of the post.
Also, there is a russian version of this article on habrahabr.ru.
–
Maxim K.
http://nginx.com
On Wednesday 24 June 2015 09:32:45 bagas wrote:
То-есть, на системе FreeBSD смысла нет использовать пул потоков от nginx?
Про пул от nginx мало информации и примерров.
You should use native AIO on FreeBSD instead.
See: http://nginx.com/blog/thread-pools-boost-performance-9x/
or in Russian: http://habrahabr.ru/post/260669/
wbr, Valentin V. Bartenev
Это я все понимаю.
Спасибо за содействие.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,259166,259872#msg-259872
Спасибо.
На хабре же я и прочитал твою статью, сделал как у тебя а в этоге фиг.
)
Пока отложу настройку пулов, пусть используются родные фряхины.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,259166,259871#msg-259871
On Wed, Jun 24, 2015 at 06:55:05PM +0300, Maxim K. wrote:
Hi there,
it seems that you start to learn Russian! 
That’s the joy of machine translation 
I hope I didn’t end up answering the wrong question.
Valentin wrote a good blog post about threads:
http://nginx.com/blog/thread-pools-boost-performance-9x/
There is a complete and simple configuration in the “Configuring
Thread Pools” section, near the end of the post.
Thanks for the pointer; I’ve had a read through it. It looks
generally good – but it does show the thread_pool directive
at http level: possibly either that or the documentation at
http://nginx.org/en/docs/ngx_core_module.html#thread_pool should be
updated to be consistent?
I think the original poster has the answers wanted – thread_pool goes
outside http, and probably isn’t needed on FreeBSD for file reads –
so it all looks good.
Cheers,
f
Francis D. [email protected]
On 6/25/15 8:21 PM, Francis D. wrote:
Valentin wrote a good blog post about threads:
updated to be consistent?
Good catch. It should be fixed. Thanks.
I think the original poster has the answers wanted – thread_pool goes
outside http, and probably isn’t needed on FreeBSD for file reads –
so it all looks good.
Cheers,
f
–
Maxim K.
http://nginx.com
On Friday 26 June 2015 10:22:59 Maxim K. wrote:
http://nginx.org/en/docs/ngx_core_module.html#thread_pool should be
updated to be consistent?
Good catch. It should be fixed. Thanks.
Fixed. Thank you, Francis.
wbr, Valentin V. Bartenev