Welcome! Log In Create A New Profile

Advanced

File not found.

Posted by FB_929 
File not found.
June 01, 2012 08:06AM
Наблюдаю странное поведение FPM:

есть тестовый скрипт
# cat test.php
<?php
echo "123";
?>

10 запросов на него отрабатывают нормально и затем 5 отдают 404
при этом заметили закономерность: количество успешных запросов всегда
равно pm.start_servers
т.е. если выствить pm.start_servers=15, то будет 15 запросов 200ok и 5
запросов 404

$ curl -v domain.com/test.php
* About to connect() to domain.com port 80 (#0)
* Trying 172.30.20.5...
* connected
* Connected to domain.com (172.30.20.5) port 80 (#0)
> GET /test.php HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13..3.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
> Host: domain.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx/1.2.0
< Date: Fri, 01 Jun 2012 11:11:42 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: keep-alive
< Keep-Alive: timeout=20
<
* Connection #0 to host domain.com left intact
123* Closing connection #0

$ curl -v domain.com/test.php
* About to connect() to domain.com port 80 (#0)
* Trying 172.30.20.5...
* connected
* Connected to domain.com (172.30.20.5) port 80 (#0)
> GET /test.php HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13..3.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
> Host: domain.com
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Server: nginx/1.2.0
< Date: Fri, 01 Jun 2012 11:11:43 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: keep-alive
< Keep-Alive: timeout=20
<
File not found.
* Connection #0 to host domain.com left intact
* Closing connection #0

# php-fpm -v
PHP 5.3.13-pl0-gentoo (fpm-fcgi) (built: May 10 2012 13:33:29)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

# php-fpm -m
[PHP Modules]
amf3
bcmath
bz2
cgi-fcgi
Core
ctype
curl
date
dom
ereg
fileinfo
filter
gd
gettext
hash
iconv
imagick
json
ldap
libxml
mbstring
mcrypt
memcache
mongo
mysql
mysqli
openssl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
redis
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]

# nginx -V
nginx version: nginx/1.2.0
TLS SNI support enabled
configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf --
error-log-path=/var/log/nginx/error_log --pid-path=/var/run/nginx.pid
--lock-path=/var/lock/nginx.lock --with-cc-opt=-I/usr/include --with-
ld-opt=-L/usr/lib --http-log-path=/var/log/nginx/access_log --http-
client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/
var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --
http-scgi-temp-path=/var/tmp/nginx/scgi --http-uwsgi-temp-path=/var/
tmp/nginx/uwsgi --with-file-aio --with-aio_module --with-debug --with-
pcre --without-http_charset_module --without-http_empty_gif_module --
without-http_map_module --without-http_memcached_module --without-
http_referer_module --without-http_scgi_module --without-
http_ssi_module --without-http_split_clients_module --without-
http_uwsgi_module --with-http_dav_module --with-http_geoip_module --
with-http_realip_module --with-http_stub_status_module --with-
http_realip_module --with-http_ssl_module --without-mail_imap_module --
without-mail_pop3_module --without-mail_smtp_module --user=nginx --
group=nginx


FPM pool config:
[tdworld]

listen = 127.0.0.1:9011
listen.allowed_clients = 127.0.0.1

user = tdworld
group = tdworld

pm = dynamic
pm.start_servers = 10
pm.max_children = 30
pm.min_spare_servers = 5
pm.max_spare_servers = 25
pm.max_requests = 100

;rlimit_files = 1024
;rlimit_core = 0

request_terminate_timeout = 1600
;request_slowlog_timeout = 280s
;slowlog = /opt/APP/tdworld/logs/phpslow.log

php_admin_flag[short_open_tag] = on
php_admin_flag[allow_url_fopen] = on
php_admin_value[memory_limit] = 768M
php_admin_value[max_execution_time] = 1200
php_admin_flag[display_errors] = off
php_admin_flag[log_errors] = on
php_admin_value[error_log] = /opt/APP/tdworld/logs/phperrors.log
php_admin_value[include_path] = /opt/APP/tdworld/php
php_admin_value[open_basedir] = /opt/APP/tdworld/php:/opt/APP/dworld/
luasrv/conf_log/storage
php_admin_flag[file_uploads] = on
php_admin_value[max_file_uploads] = 300
php_admin_value[upload_tmp_dir] = /opt/APP/tdworld/php/tmp
php_admin_value[upload_max_filesize] = 10M
php_admin_value[date.timezone] = Europe/Moscow
php_admin_value[session.save_path] = /opt/APP/tdworld/sessions
;php_admin_value[disable_functions] = exec,set_time_limit


nginx vhost:
server {
listen 80;
server_name domain.com;
root /opt/APP/tdworld/php/www;

# access_log off;
access_log /opt/APP/tdworld/logs/nginx/access.log main;
error_log /opt/APP/tdworld/logs/nginx/error.log debug;

fastcgi_buffers 8 16k;
fastcgi_buffer_size 16k;
fastcgi_read_timeout 180s;

include f.conf;
index index.php;

location /shared/ {
access_log off;
# access_log /opt/APP/tdworld/logs/nginx/static-access.log main;
}

location ~ \.php$ {
include fastcgi_params;
fastcgi_pass localhost:9011;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 180;
}

rewrite ^/admin/$ /admin/index.php last;
}
No1
Re: File not found.
June 01, 2012 09:42AM
А что в логах?

2012/6/1 Григорий Ефимов <fb_929@fb-929.name>

> Наблюдаю странное поведение FPM:
>
> есть тестовый скрипт
> # cat test.php
> <?php
> echo "123";
> ?>
>
> 10 запросов на него отрабатывают нормально и затем 5 отдают 404
> при этом заметили закономерность: количество успешных запросов всегда
> равно pm.start_servers
> т.е. если выствить pm.start_servers=15, то будет 15 запросов 200ok и 5
> запросов 404
>
> $ curl -v domain.com/test.php
> * About to connect() to domain.com port 80 (#0)
> * Trying 172.30.20.5...
> * connected
> * Connected to domain.com (172.30.20.5) port 80 (#0)
> > GET /test.php HTTP/1.1
> > User-Agent: curl/7.24.0 (x86_64-redhat-linux-gnu) libcurl/7.24.0 NSS/
> 3.13.3.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
> > Host: domain.com
> > Accept: */*
> >
> < HTTP/1.1 200 OK
> < Server: nginx/1.2.0
> < Date: Fri, 01 Jun 2012 11:11:42 GMT
> < Content-Type: text/html
> < Transfer-Encoding: chunked
> < Connection: keep-alive
> < Keep-Alive: timeout=20
> <
> * Connection #0 to host domain.com left intact
> 123* Closing connection #0
>
> $ curl -v domain.com/test.php
> * About to connect() to domain.com port 80 (#0)
> * Trying 172.30.20.5...
> * connected
> * Connected to domain.com (172.30.20.5) port 80 (#0)
> > GET /test.php HTTP/1.1
> > User-Agent: curl/7.24.0 (x86_64-redhat-linux-gnu) libcurl/7.24.0 NSS/
> 3.13.3.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
> > Host: domain.com
> > Accept: */*
> >
> < HTTP/1.1 404 Not Found
> < Server: nginx/1.2.0
> < Date: Fri, 01 Jun 2012 11:11:43 GMT
> < Content-Type: text/html
> < Transfer-Encoding: chunked
> < Connection: keep-alive
> < Keep-Alive: timeout=20
> <
> File not found.
> * Connection #0 to host domain.com left intact
> * Closing connection #0
>
> # php-fpm -v
> PHP 5.3.13-pl0-gentoo (fpm-fcgi) (built: May 10 2012 13:33:29)
> Copyright (c) 1997-2009 The PHP Group
> Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
>
> # php-fpm -m
> [PHP Modules]
> amf3
> bcmath
> bz2
> cgi-fcgi
> Core
> ctype
> curl
> date
> dom
> ereg
> fileinfo
> filter
> gd
> gettext
> hash
> iconv
> imagick
> json
> ldap
> libxml
> mbstring
> mcrypt
> memcache
> mongo
> mysql
> mysqli
> openssl
> pcre
> PDO
> pdo_mysql
> pdo_pgsql
> pdo_sqlite
> pgsql
> Phar
> posix
> redis
> Reflection
> session
> SimpleXML
> soap
> sockets
> SPL
> sqlite3
> standard
> tokenizer
> xml
> xmlreader
> xmlwriter
> xsl
> zip
> zlib
>
> [Zend Modules]
>
> # nginx -V
> nginx version: nginx/1.2.0
> TLS SNI support enabled
> configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf --
> error-log-path=/var/log/nginx/error_log --pid-path=/var/run/nginx.pid
> --lock-path=/var/lock/nginx.lock --with-cc-opt=-I/usr/include --with-
> ld-opt=-L/usr/lib --http-log-path=/var/log/nginx/access_log --http-
> client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/
> var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --
> http-scgi-temp-path=/var/tmp/nginx/scgi --http-uwsgi-temp-path=/var/
> tmp/nginx/uwsgi --with-file-aio --with-aio_module --with-debug --with-
> pcre --without-http_charset_module --without-http_empty_gif_module --
> without-http_map_module --without-http_memcached_module --without-
> http_referer_module --without-http_scgi_module --without-
> http_ssi_module --without-http_split_clients_module --without-
> http_uwsgi_module --with-http_dav_module --with-http_geoip_module --
> with-http_realip_module --with-http_stub_status_module --with-
> http_realip_module --with-http_ssl_module --without-mail_imap_module --
> without-mail_pop3_module --without-mail_smtp_module --user=nginx --
> group=nginx
>
>
> FPM pool config:
> [tdworld]
>
> listen = 127.0.0.1:9011
> listen.allowed_clients = 127.0.0.1
>
> user = tdworld
> group = tdworld
>
> pm = dynamic
> pm.start_servers = 10
> pm.max_children = 30
> pm.min_spare_servers = 5
> pm.max_spare_servers = 25
> pm.max_requests = 100
>
> ;rlimit_files = 1024
> ;rlimit_core = 0
>
> request_terminate_timeout = 1600
> ;request_slowlog_timeout = 280s
> ;slowlog = /opt/APP/tdworld/logs/phpslow.log
>
> php_admin_flag[short_open_tag] = on
> php_admin_flag[allow_url_fopen] = on
> php_admin_value[memory_limit] = 768M
> php_admin_value[max_execution_time] = 1200
> php_admin_flag[display_errors] = off
> php_admin_flag[log_errors] = on
> php_admin_value[error_log] = /opt/APP/tdworld/logs/phperrors.log
> php_admin_value[include_path] = /opt/APP/tdworld/php
> php_admin_value[open_basedir] = /opt/APP/tdworld/php:/opt/APP/dworld/
> luasrv/conf_log/storage
> php_admin_flag[file_uploads] = on
> php_admin_value[max_file_uploads] = 300
> php_admin_value[upload_tmp_dir] = /opt/APP/tdworld/php/tmp
> php_admin_value[upload_max_filesize] = 10M
> php_admin_value[date.timezone] = Europe/Moscow
> php_admin_value[session.save_path] = /opt/APP/tdworld/sessions
> ;php_admin_value[disable_functions] = exec,set_time_limit
>
>
> nginx vhost:
> server {
> listen 80;
> server_name domain.com;
> root /opt/APP/tdworld/php/www;
>
> # access_log off;
> access_log /opt/APP/tdworld/logs/nginx/access.log main;
> error_log /opt/APP/tdworld/logs/nginx/error.log debug;
>
> fastcgi_buffers 8 16k;
> fastcgi_buffer_size 16k;
> fastcgi_read_timeout 180s;
>
> include f.conf;
> index index.php;
>
> location /shared/ {
> access_log off;
> # access_log /opt/APP/tdworld/logs/nginx/static-access.log
> main;
> }
>
> location ~ \.php$ {
> include fastcgi_params;
> fastcgi_pass localhost:9011;
> fastcgi_param SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
> fastcgi_read_timeout 180;
> }
>
> rewrite ^/admin/$ /admin/index.php last;
> }
Re: File not found.
June 01, 2012 10:02AM
On 06/01/2012 05:41 PM, No1 wrote:
> А что в логах?
>

в логах ничего подозрительно =)
Re: File not found.
June 01, 2012 10:10AM
в логах ничего подозрительно =)

On 1 июн, 17:41, No1 <smile.neversm...@gmail.com> wrote:
> А что в логах?
Sergey Golovashov
Re: File not found.
June 02, 2012 10:48AM
А все же что а access.log?..
01.06.2012 18:09 пользователь "Григорий Ефимов" <fb_929@fb-929.name>
написал:

> в логах ничего подозрительно =)
>
> On 1 июн, 17:41, No1 <smile.neversm...@gmail.com> wrote:
> > А что в логах?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 75
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready