Welcome! Log In Create A New Profile

Advanced

Re: XML files truncated

Axel
May 31, 2010 07:24AM
Hi again,

nginx is running under www-data:www-data (it is maybe a bad idea isn't it?).. I doublechecked filesystem permission and issued a chown -R www-data: fastcgi_temp && chmod -R 664 fastcgi_temp.
This didn't solve the issue. Here is some debug information below.

---------

root@o:/usr/local/nginx# nginx -V
nginx version: nginx/0.7.65
built by gcc 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
configure arguments: --with-cc-opt=-O3 --user=www-data --group=www-data --add-module=./modules/nginx_mp4_streaming_public --with-http_stub_status_module

## CONFIG
user www-data www-data;
worker_processes 5;

events {
use epoll;
worker_connections 2048;
}

http {
include mime.types;
include fastcgi_params;
default_type application/octet-stream;

sendfile off;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
ignore_invalid_headers on;
# client_body_buffer_size 8k;
# client_header_buffer_size 1k;
# client_max_body_size 1k;
# large_client_header_buffers 1 1k;

client_body_timeout 5;
client_header_timeout 5;
keepalive_timeout 15 14;
send_timeout 5;

gzip on;
gzip_comp_level 4;
gzip_proxied any;
gzip_buffers 16 8k;
gzip_types text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/xhtml+xml;

expires 1d;

error_log /var/log/nginx/error.log notice;
access_log /var/log/nginx/access.log;


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


server
{
listen 80;
server_name www.xxx.com;
root /var/www/xxx/prod/public;
index index.php;

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/xxx_access.log main;

location /
{

try_files $uri $uri/ @kohana;

fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;

include fastcgi_params;
}

location ~ /\. {
deny all;
}

location @kohana
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/index..php;
include fastcgi_params;
}

location ~* \.css|\.js|\.jpg|\.jpeg|\.png|\.gif|\.swf|\.svg|\.tiff$ {
expires 30d;
}
}


## DEBUG LOG:
2010/05/31 12:36:52 [crit] 22005#0: *5 open() "/usr/local/nginx/fastcgi_temp/1/00/0000000001" failed (13: Permission denied) while reading upstream, client: 93.17.75.xxx, server: xxx, request: "GET /rss/restaurants/sitemap HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.xxx.com"
2010/05/31 12:41:37 [warn] 22008#0: *312 an upstream response is buffered to a temporary file /usr/local/nginx/fastcgi_temp/7/00/0000000007 while reading upstream, client: 93.17.75.xxx, server: www.xxx.com, request: "GET /rss/restaurants/sitemap HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.xxx.com"
2010/05/31 12:55:47 [crit] 22008#0: *1234 open() "/usr/local/nginx/fastcgi_temp/6/04/0000000046" failed (13: Permission denied) while reading upstream, client: 128.30.52.xxx, server: www.xxx.com, request: "GET /rss/restaurants/sitemap HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.xxx.com"


Thks a lot

Axel




Le 31 mai 2010 à 12:41, Maxim Dounin a écrit :

> Hello!
>
> On Mon, May 31, 2010 at 11:43:21AM +0200, Axel wrote:
>
>> Hi guys,
>>
>> I recently migrated from Apache to Nginx. Really cool. My
>> website is much faster. BUT I have a really weird issue that
>> didn't occur with Apache. It seems that some big files are
>> sometimes truncated by the server. For instance, I generate a
>> 200 entries videos sitemap (4600 lines) for Google (Google
>> allows up to 50 000 entries FYI). Quite often, Google cannot
>> parse this XML file because it is truncated in the middle and
>> the XML is therefore no longer valid. It seems I have the same
>> issue when I browse this XML into Safari or Firefox. When I try
>> a feed validator (http://validator.w3.org/feed/check.cgi), the
>> test fails 8 times out of 10 and the source is clearly
>> truncated.
>>
>> I tried to disable gzip encoding or to adapt quite a lot of
>> settings. Nothing did the trick. Have U any idea that could
>> help?
>> Thks a lot
>
> 1. As Anton already suggested, try looking into error log. From
> symptoms you describe it looks like nginx can't write to
> fastcgi_temp_path/proxy_temp_path, it should complain in logs.
>
> 2. If the above doesn't help, please follow this topic:
>
> http://wiki.nginx.org/NginxDebugging
>
> You have to provide config, nginx -V and debug log of a request
> which exposes the problem.
>
> Maxim Dounin
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx


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

XML files truncated

Axel May 31, 2010 05:50AM

Re: XML files truncated

Anton Yuzhaninov May 31, 2010 06:26AM

Re: XML files truncated

Axel May 31, 2010 06:42AM

Re: XML files truncated

Maxim Dounin May 31, 2010 06:44AM

Re: XML files truncated

Axel May 31, 2010 07:24AM

Re: XML files truncated

Maxim Dounin May 31, 2010 07:48AM

Re: XML files truncated

Axel May 31, 2010 10:04AM

Re: XML files truncated

Anonymous User May 31, 2010 10:14AM

Re: XML files truncated

Maxim Dounin May 31, 2010 10:22AM

Re: XML files truncated

Axel May 31, 2010 10:40AM

Re: XML files truncated

Igor Sysoev May 31, 2010 10:44AM

Re: XML files truncated

Axel May 31, 2010 11:02AM

Re: XML files truncated

Axel May 31, 2010 10:10AM

Re: XML files truncated

Piotr Sikora May 31, 2010 10:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 159
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready