Genaker / FastFPC

Magento 2 improved FPC and Varnish replacement was used for Magento SaaS solution when you need high performace and scaling. No more outdated Adobes official Varnish approach is requred
50 stars 10 forks source link

Magento 2.4.6 issues, blank page and deploy error #8

Open s1mplex1337 opened 3 months ago

s1mplex1337 commented 3 months ago

Doesn't seem work on Magento 2.4.6 on a cloudlinux instance with php8.1, unfortunately. Upon running "bin/magento fpc:deploy" it gives the following error:

`PHP Warning:  Module "igbinary" is already loaded in Unknown on line 0
grep -r "FPC.php" /var/www/vhosts/mydomain.com/httpdocs/pub/index.php || sed -i '2 i include "/var/www/vhosts/mydomain.com/httpdocs/vendor/mage/fpc/Mage/FPC/FPC.php";' /var/www/vhosts/mydomain.com/httpdocs/pub/index.php
array(1) {
  [0]=>
  string(94) "include "/var/www/vhosts/mydomain.com/httpdocs/vendor/mage/fpc/src/Mage/FPC.php";"
}

There is an error in /var/www/vhosts/mydomain.com/httpdocs/vendor/symfony/console/Command/Command.php at line: 301
Return value of "Mage\FPC\Console\Deploy\Interceptor::execute()" must be of the type int, "null" returned.#0 /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run()
#1 /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(138): Mage\FPC\Console\Deploy\Interceptor->___callParent()
#2 /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(153): Mage\FPC\Console\Deploy\Interceptor->Magento\Framework\Interception\{closure}()
#3 /var/www/vhosts/mydomain.com/httpdocs/generated/code/Mage/FPC/Console/Deploy/Interceptor.php(23): Mage\FPC\Console\Deploy\Interceptor->___callPlugins()
#4 /var/www/vhosts/mydomain.com/httpdocs/vendor/symfony/console/Application.php(1040): Mage\FPC\Console\Deploy\Interceptor->run()
#5 /var/www/vhosts/mydomain.com/httpdocs/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#6 /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()
#7 /var/www/vhosts/mydomain.com/httpdocs/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun()
#8 /var/www/vhosts/mydomain.com/httpdocs/bin/magento(23): Symfony\Component\Console\Application->run()
#9 {main}`

Tried different approaches wit app folder and composer. Adding to index or bootstrap or ngingx. Just a blank page after that and above error. Any idea what this could be? PHPRedis is installed.

Genaker commented 3 months ago

You don't needto run this command. Check what this command is doing and do the same manually.

This one is instruction

On Wed, Apr 17, 2024 at 2:05 AM s1mplex1337 @.***> wrote:

Doesn't seem work on Magento 2.4.6 on a cloudlinux instance with php8.1, unfortunately. Upon running "bin/magento fpc:deploy" it gives the following error:

`PHP Warning: Module "igbinary" is already loaded in Unknown on line 0 grep -r "FPC.php" /var/www/vhosts/mydomain.com/httpdocs/pub/index.php || sed -i '2 i include "/var/www/vhosts/mydomain.com/httpdocs/vendor/mage/fpc/Mage/FPC/FPC.php";' /var/www/vhosts/mydomain.com/httpdocs/pub/index.php array(1) { [0]=> string(94) "include "/var/www/vhosts/mydomain.com/httpdocs/vendor/mage/fpc/src/Mage/FPC.php";" }

There is an error in /var/www/vhosts/mydomain.com/httpdocs/vendor/symfony/console/Command/Command.php at line: 301 Return value of "Mage\FPC\Console\Deploy\Interceptor::execute()" must be of the type int, "null" returned.#0 /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run()

1 /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(138): Mage\FPC\Console\Deploy\Interceptor->___callParent()

2 /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(153): Mage\FPC\Console\Deploy\Interceptor->Magento\Framework\Interception{closure}()

3 /var/www/vhosts/mydomain.com/httpdocs/generated/code/Mage/FPC/Console/Deploy/Interceptor.php(23): Mage\FPC\Console\Deploy\Interceptor->___callPlugins()

4 /var/www/vhosts/mydomain.com/httpdocs/vendor/symfony/console/Application.php(1040): Mage\FPC\Console\Deploy\Interceptor->run()

5 /var/www/vhosts/mydomain.com/httpdocs/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()

6 /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()

7 /var/www/vhosts/mydomain.com/httpdocs/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun()

8 /var/www/vhosts/mydomain.com/httpdocs/bin/magento(23): Symfony\Component\Console\Application->run()

9 {main}`

Tried different approaches wit app folder and composer. Adding to index or bootstrap or ngingx. Just a blank page after that and above error. Any idea what this could be? PHPRedis is installed.

— Reply to this email directly, view it on GitHub https://github.com/Genaker/FastFPC/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGJNZVSRMZHFDE3EXTYUZLY5Y3OHAVCNFSM6AAAAABGK4NRR6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2DONZXGE3TGNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

s1mplex1337 commented 3 months ago

Hey thanks, so just found this, maybe just for my install, maybe it helps someone else too:

in the file /vendor/mage/fpc/Mage/FPC/FPC.php when using composer installation, then comment the 1st $config as described but also the 2nd config for composer had one ../ too many.

So it should then look like this:

//For app folder
    // $config = require __DIR__ . '/../../../../app/etc/env.php';
    //For Composer Folder ToDO: remove src from the composer to make app = to vendor
    $config = require __DIR__ . '/../../../../../app/etc/env.php';
Genaker commented 3 months ago

But I don't have the src folder anymore. Which one works for you?

On Thu, Apr 18, 2024 at 4:49 AM s1mplex1337 @.***> wrote:

Hey thanks, so just found this, maybe just for my install, maybe it helps someone else too:

in the file /vendor/mage/fpc/Mage/FPC/FPC.php when using composer installation, then comment the 1st $config as described but also the 2nd config for composer had one ../ too many.

So it should then look like this:

//For app folder // $config = require DIR . '/../../../../app/etc/env.php'; //For Composer Folder ToDO: remove src from the composer to make app = to vendor $config = require DIR . '/../../../../../app/etc/env.php';

— Reply to this email directly, view it on GitHub https://github.com/Genaker/FastFPC/issues/8#issuecomment-2063677499, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGJNZXOI7ABB2ACQFYA4XTY56XMZAVCNFSM6AAAAABGK4NRR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRTGY3TONBZHE . You are receiving this because you commented.Message ID: @.***>

s1mplex1337 commented 3 months ago

I just installed from composer and changed this line in FPC.php so it works for me now:

$config = require DIR . '/../../../../../app/etc/env.php'; it's 5 folders up not 6. But could be different I guess, however my magento 2.4.6 install is pretty standard I think.

and in the index.php file i added this manually: include "/var/www/vhosts/mydomain.com/httpdocs/vendor/mage/fpc/Mage/FPC/FPC.php";

I have not tried the app folder manual install.

Genaker commented 3 months ago

Could you please share your FPC performance results before and after

On Thu, Apr 18, 2024 at 8:19 AM s1mplex1337 @.***> wrote:

I just installed from composer and changed this line so it works for me now:

$config = require DIR . '/../../../../../app/etc/env.php';

it's 5 folders up not 6. But could be different I guess, however my magento 2.4.6 install is pretty standard I think.

I have not tried the app folder manual install.

— Reply to this email directly, view it on GitHub https://github.com/Genaker/FastFPC/issues/8#issuecomment-2064201565, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGJNZVOV6XGPCTZ54UUAPDY57QAZAVCNFSM6AAAAABGK4NRR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRUGIYDCNJWGU . You are receiving this because you commented.Message ID: @.***>

amelojunior commented 2 months ago

@Genaker What tool did you use to measure the FPC generation time?

Genaker commented 2 months ago

Apache Benchmark

On Mon, Apr 29, 2024 at 1:38 PM adair @.***> wrote:

@Genaker https://github.com/Genaker What tool did you use to measure the FPC generation time?

— Reply to this email directly, view it on GitHub https://github.com/Genaker/FastFPC/issues/8#issuecomment-2083290479, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGJNZXKXIQF4H4GVDTFA7TY72ARNAVCNFSM6AAAAABGK4NRR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBTGI4TANBXHE . You are receiving this because you were mentioned.Message ID: @.***>