nginx got an 500 error when uploading files

Maxim Dounin mdounin at
Mon May 27 12:11:43 UTC 2013


On Sun, May 26, 2013 at 12:03:58PM +0800, baalchina wrote:

> Hi everyone,
> I am using nginx 1.4.1 and php-fpm 5.3.25.
> Everything is fine except when I uploading files to server.
> I have a Discuz! x3(a forum system) and when I post threads, except
> attachment everything is fine, but when I add a small files(such as 30k
> rar,jpg or else), nginx give me a 500 error.
> I checked the nginx/site error, but have no usefule information. nginx only
> tell me a got an 500 error, but didn't tell me why.
> I tried to increase the fast_cgi parama:
>   fastcgi_connect_timeout 300;
>   fastcgi_send_timeout 300;
>   fastcgi_read_timeout 300;
>   fastcgi_buffer_size 1024k;
>   fastcgi_buffers 32 64k;
>   fastcgi_busy_buffers_size 1500k;
>   fastcgi_temp_file_write_size 1800k;
> But still the same.
> So, please help me for solve this problem, I wonder where can I got the
> error message?

If the 500 is returned by nginx, there should be an explanation in 
error log.

If there is nothing in error log - this suggests the 500 response 
is generated by php, and you have to dig into the php code to see 
what happens there.

Maxim Dounin

More information about the nginx mailing list