mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
Add a memory limit setting
This commit is contained in:
parent
48c67fff5e
commit
c95d74d487
3 changed files with 12 additions and 0 deletions
|
@ -37,6 +37,12 @@ APP_URL=http://localhost
|
|||
APP_MAX_SCAN_TIME=600
|
||||
|
||||
|
||||
# The memory limit, in MB, used by the scanning process.
|
||||
# For example, if you want to set a memory limit of 2048MB, enter "2048" (without
|
||||
# quotes) here.
|
||||
MEMORY_LIMIT=
|
||||
|
||||
|
||||
# The streaming method.
|
||||
# Can be either 'php' (default), 'x-sendfile', or 'x-accel-redirect'
|
||||
# See https://github.com/phanan/koel/wiki#streaming-music for more information.
|
||||
|
|
|
@ -57,6 +57,10 @@ class Media
|
|||
set_time_limit(config('koel.sync.timeout'));
|
||||
}
|
||||
|
||||
if (config('koel.memory_limit')) {
|
||||
ini_set('memory_limit', config('koel.memory_limit').'M');
|
||||
}
|
||||
|
||||
$mediaPath = $mediaPath ?: Setting::get('media_path');
|
||||
$this->setTags($tags);
|
||||
|
||||
|
|
|
@ -117,6 +117,8 @@ return [
|
|||
|
||||
'cache_media' => env('CACHE_MEDIA', true),
|
||||
|
||||
'memory_limit' => env('MEMORY_LIMIT'),
|
||||
|
||||
'misc' => [
|
||||
'home_url' => 'https://koel.phanan.net/',
|
||||
'docs_url' => 'https://koel.phanan.net/docs',
|
||||
|
|
Loading…
Reference in a new issue