Skip to content

Commit

Permalink
Reduce max allowed memory for SCSS compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne committed Jan 13, 2025
1 parent 1bbd456 commit 0387999
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions front/css.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
use Glpi\Application\ErrorHandler;
use Glpi\UI\ThemeManager;

// Main CSS compilation requires about 140MB of memory on PHP 7.4 (110MB on PHP 8.2).
// Main CSS compilation requires about 70MB of memory.
// Ensure to have enough memory to not reach memory limit.
$max_memory = 192;
$max_memory = 96;
if (Toolbox::getMemoryLimit() < ($max_memory * 1024 * 1024)) {
ini_set('memory_limit', sprintf('%dM', $max_memory));
}
Expand Down

0 comments on commit 0387999

Please sign in to comment.