Skip to content

Commit

Permalink
MAGETWO-82747: [TASK] Updated user.ini according to Magento DevDocs #…
Browse files Browse the repository at this point in the history
  • Loading branch information
ishakhsuvarov authored Oct 26, 2017
2 parents d4e4e5d + 1cc5ada commit ec61612
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
############################################
## adjust memory limit

php_value memory_limit 768M
php_value memory_limit 756M
php_value max_execution_time 18000

############################################
Expand All @@ -59,7 +59,7 @@
############################################
## adjust memory limit

php_value memory_limit 768M
php_value memory_limit 756M
php_value max_execution_time 18000

############################################
Expand Down
2 changes: 1 addition & 1 deletion .htaccess.sample
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
############################################
## adjust memory limit

php_value memory_limit 768M
php_value memory_limit 756M
php_value max_execution_time 18000

############################################
Expand Down
2 changes: 1 addition & 1 deletion .user.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
memory_limit = 768M
memory_limit = 756M
max_execution_time = 18000
session.auto_start = off
suhosin.session.cryptua = off
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ private function updateMemoryLimit()
if (function_exists('ini_set')) {
@ini_set('display_errors', 1);
$memoryLimit = trim(ini_get('memory_limit'));
if ($memoryLimit != -1 && $this->getMemoryInBytes($memoryLimit) < 768 * 1024 * 1024) {
@ini_set('memory_limit', '768M');
if ($memoryLimit != -1 && $this->getMemoryInBytes($memoryLimit) < 756 * 1024 * 1024) {
@ini_set('memory_limit', '756M');
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions nginx.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ location ~* ^/setup($|/) {
fastcgi_pass fastcgi_backend;

fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
fastcgi_param PHP_VALUE "memory_limit=768M \n max_execution_time=600";
fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=600";
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;

Expand Down Expand Up @@ -168,7 +168,7 @@ location ~ (index|get|static|report|404|503|health_check)\.php$ {
fastcgi_buffers 1024 4k;

fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
fastcgi_param PHP_VALUE "memory_limit=768M \n max_execution_time=18000";
fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=18000";
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;

Expand Down
4 changes: 2 additions & 2 deletions pub/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
############################################
## Adjust memory limit

php_value memory_limit 768M
php_value memory_limit 756M
php_value max_execution_time 18000

############################################
Expand All @@ -60,7 +60,7 @@
############################################
## Adjust memory limit

php_value memory_limit 768M
php_value memory_limit 756M
php_value max_execution_time 18000

############################################
Expand Down
2 changes: 1 addition & 1 deletion pub/.user.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
memory_limit = 768M
memory_limit = 756M
max_execution_time = 18000
session.auto_start = off
suhosin.session.cryptua = off

2 comments on commit ec61612

@lucasmilin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change memory limit from 768M to 756M? It is not a power of two. Thanks

@kirmorozov
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would even put 256 there, just to make sure people dont waste memory.

Please sign in to comment.