Skip to content

Commit

Permalink
Add in options for increasing nginx/php timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
David Farrington committed Feb 26, 2015
1 parent baae1d4 commit d8d10b4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
7 changes: 7 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,10 @@ magento_db_host: localhost
magento_table_prefix: ''
magento_session_storage: files
magento_admin_path: admin

# Timeout settings
magento_fastcgi_read_timeout: 60s
magento_proxy_read_timeout: 60s
magento_client_max_body_size: 500M
magento_client_header_timeout: 60s
magento_client_body_timeout: 60s
22 changes: 14 additions & 8 deletions templates/vhost.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ server {
ssl_ciphers HIGH:!aNULL:!MD5;
{% endif %}

client_max_body_size 4G;
client_max_body_size {{ magento_client_max_body_size }};
client_header_timeout {{ magento_client_header_timeout }};
client_body_timeout {{ magento_client_body_timeout }};
proxy_read_timeout {{ magento_proxy_read_timeout }};

access_log {{ magento_access_log }};
error_log {{ magento_error_log }};
Expand Down Expand Up @@ -70,13 +73,16 @@ server {
location ~ .php$ {
if (!-e $request_filename) { rewrite / /index.php last; }

expires off;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param HTTPS $fastcgi_https;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
include fastcgi_params;
expires off;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param HTTPS $fastcgi_https;
fastcgi_read_timeout {{ magento_fastcgi_read_timeout }};
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
fastcgi_buffers 8 128k;
fastcgi_buffer_size 128k;
include fastcgi_params;
}

}

0 comments on commit d8d10b4

Please sign in to comment.