Skip to content

Commit

Permalink
Add preload
Browse files Browse the repository at this point in the history
  • Loading branch information
steevanb committed Feb 14, 2020
1 parent 36d2c86 commit dd23935
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .phpbenchmarks/php/7.4/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .phpbenchmarks/php/7.4/preload.php
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
<?php

declare(strict_types=1);

opcache_compile_file(__DIR__ . '/../../../public/index.php');

// If somebody find why when I add any file in src/ into preload,
// PHP-FPM restart whithout error but i have a white page or a 502 with only this log:
// WARNING: [pool www] child 2854 exited on signal 6 (SIGABRT - core dumped) after 0.154003 seconds from start
// I think it's because of the size of the preloaded files
//opcache_compile_file(__DIR__ . '/../../../src/blocks.php');
//opcache_compile_file(__DIR__ . '/../../../src/functions.php');
//opcache_compile_file(__DIR__ . '/../../../src/macros.php');
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"license": "proprietary",
"type": "project",
"require": {
"php": "7.4.2"
"php": "7.4.2",
"ext-zend-opcache": "*"
}
}

0 comments on commit dd23935

Please sign in to comment.