I try to follow the instructions here to enable JIT in PHP 8.1.21
I set the JIT buffer size to 256M, as below:
opcache.jit_buffer_size=256M
I also enabled opcache.enable_cli as this article suggests me to do so
opcache.enable=1
opcache.enable_cli=1
After that, I restart PHP FPM service.
Then I check https://www.example.com/opcache.php
and everything is correct, jit buffer size is 256MB.
And then I check https://www.example.com/phpinfo.php
which also shows JIT is ON.
Then I visit one page on the test site, https://www.example.com/
, I will get " 503 Service Unavailable error".
Then If I go back to https://www.example.com/opcache.php
, I will also get 503 error.
It seems that once we try to use JIT, there will be 503 error. Why?
I check the Apache error log, and see the following:
[Wed Jul 19 09:40:46.504648 2023] [proxy_fcgi:error] [pid 5914:tid 47200906626816] [remote 79.107.70.235:1854] AH01067: Failed to read FastCGI header
[Wed Jul 19 09:40:46.504677 2023] [proxy_fcgi:error] [pid 5914:tid 47200906626816] (104)Connection reset by peer: [remote 79.107.70.235:1854] AH01075: Error dispatching request to :
Update:
The PHP version is 8.1.21.