简体   繁体   中英

Wordpress theme not uploading to Amazon EC2?

I'm setting up a Wordpress blog on Amazon EC2 server with nginx and Varnish. I've followed this tutorial step by step.

The blog is setup & working fine.

Now when I try to upload a new theme through Wordpress, it starts uploading and by the time it reaches 70%(takes around 1 minute to reach 70%), the connection is abruptly disconnected with the error code: ERR_CONNECTION_ABORTED

I'm guessing it is due to some connection timeout that's happening in nginx, varnish or somewhere else.

I'm new to this stuff. I did the following:

  1. I changed the timeout in /etc/php5/fpm/pool.d/www.conf to request_terminate_timeout = 500

  2. I changed the timeout in /etc/nginx/nginx.conf to fastcgi_read_timeout 500;

But that didn't seem to work. I'm stuck. Kindly guide me.

For anyone facing the same issue, here's the solution. Solved it by adding the following settings:

php-fpm's php.ini

max_execution_time = 240
upload_max_filesize = 32M
post_max_size = 32M

php-fpm's pool configuration

request_terminate_timeout = 240s
request_slowlog_timeout = 230s
slowlog = /var/log/php5-fpm.slow.log

nginx.conf

client_header_timeout 240;
client_body_timeout 240;
fastcgi_read_timeout 240;
client_max_body_size 32m;

All thanks to this wonderful post

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM