Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/check/PhabricatorStorageSetupCheck.php
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | if ($memory_limit && ((int)$memory_limit > 0)) { | ||||
if ($need_bytes > $available_bytes) { | if ($need_bytes > $available_bytes) { | ||||
$summary = pht( | $summary = pht( | ||||
'Your PHP memory limit is configured in a way that may prevent '. | 'Your PHP memory limit is configured in a way that may prevent '. | ||||
'you from uploading large files or handling large requests.'); | 'you from uploading large files or handling large requests.'); | ||||
$message = pht( | $message = pht( | ||||
'When you upload a file via drag-and-drop or the API, chunks must '. | 'When you upload a file via drag-and-drop or the API, chunks must '. | ||||
'be buffered into memory before being written to permanent '. | 'be buffered into memory before being written to permanent '. | ||||
'storage. Phabricator needs memory available to store these '. | 'storage. This server needs memory available to store these '. | ||||
'chunks while they are uploaded, but PHP is currently configured '. | 'chunks while they are uploaded, but PHP is currently configured '. | ||||
'to severely limit the available memory.'. | 'to severely limit the available memory.'. | ||||
"\n\n". | "\n\n". | ||||
'PHP processes currently have very little free memory available '. | 'PHP processes currently have very little free memory available '. | ||||
'(%s). To work well, processes should have at least %s.'. | '(%s). To work well, processes should have at least %s.'. | ||||
"\n\n". | "\n\n". | ||||
'(Note that the application itself must also fit in available '. | '(Note that the application itself must also fit in available '. | ||||
'memory, so not all of the memory under the memory limit is '. | 'memory, so not all of the memory under the memory limit is '. | ||||
'available for running workloads.)'. | 'available for running workloads.)'. | ||||
"\n\n". | "\n\n". | ||||
"The easiest way to resolve this issue is to set %s to %s in your ". | "The easiest way to resolve this issue is to set %s to %s in your ". | ||||
"PHP configuration, to disable the memory limit. There is ". | "PHP configuration, to disable the memory limit. There is ". | ||||
"usually little or no value to using this option to limit ". | "usually little or no value to using this option to limit ". | ||||
"Phabricator process memory.". | "process memory.". | ||||
"\n\n". | "\n\n". | ||||
"You can also increase the limit or ignore this issue and accept ". | "You can also increase the limit or ignore this issue and accept ". | ||||
"that you may encounter problems uploading large files and ". | "that you may encounter problems uploading large files and ". | ||||
"processing large requests.", | "processing large requests.", | ||||
phutil_format_bytes($available_bytes), | phutil_format_bytes($available_bytes), | ||||
phutil_format_bytes($need_bytes), | phutil_format_bytes($need_bytes), | ||||
phutil_tag('tt', array(), 'memory_limit'), | phutil_tag('tt', array(), 'memory_limit'), | ||||
phutil_tag('tt', array(), '-1')); | phutil_tag('tt', array(), '-1')); | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |