Server errors (504/500) during Prestashop install process on 32-bit device

What type of hardware are you using: Raspberry Pi 3, 4+
What YunoHost version are you running: 11.2.30.2 stable
What app is this about: Prestashop

Describe your issue

I’m running into nginx server 504 gateway time out error during the install process of Prestashop. Its the same error as in this old, closed without answers, topic : 504 Gateway Time-out nginx lors de l’installation prestashop sur WebApp Custom.

There was already a previous install step that failed because of a server timeout, but after 2 or 3 times the step passed successfully.

But this last install step (see screenshot) seems to fail every time :confused:

Can it be due to my raspberry pi 3 ressources ? Before install it seemed to match all the prerequisites.

Edit :
I found two prestashop forum thread with similar problems :

  • [french] this one talks about the same 1 minute timout that I have
  • this other one also talks about a timeout error and a fastcgi config

I suspect there is a problem in one config file, but I did not manage to find out which one, which maybe sets a timout too low for my device.

Share relevant logs or error messages

nginx error log (last lines) :

2024/11/15 15:12:26 [error] 18813#18813: *123586 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?installDatabase=true&_=1731683485392 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php"
2024/11/15 15:13:21 [error] 18813#18813: *123586 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/sandbox/anything.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock:", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php?step=database"
2024/11/15 15:13:21 [error] 18813#18813: *123586 FastCGI sent in stderr: "PHP message: PHP Warning:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26" while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?compile_templates=1&bo=1 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock:", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php?step=database"
2024/11/15 15:13:29 [error] 18813#18813: *123586 FastCGI sent in stderr: "PHP message: PHP Warning:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26" while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?compile_templates=1&bo=0 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock:", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php?step=database"
2024/11/15 15:13:46 [error] 18813#18813: *123586 FastCGI sent in stderr: "PHP message: PHP Warning:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26" while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?compile_templates=1&bo=1 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock:", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php"
2024/11/15 15:13:46 [error] 18813#18813: *123586 FastCGI sent in stderr: "PHP message: PHP Warning:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26" while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?compile_templates=1&bo=0 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock:", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php"
2024/11/15 15:13:55 [error] 18813#18813: *123586 FastCGI sent in stderr: "PHP message: PHP Warning:  Attempt to read property "theme_name" on null in /var/www/prestashop/var/cache/prod/ContainerWGxVx22/appAppKernelProdContainer.php on line 2871" while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?generateSettingsFile=true&_=1731683625769 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock:", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php"
2024/11/15 15:14:55 [error] 18813#18813: *123586 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?installDatabase=true&_=1731683625770 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php"
2024/11/15 15:19:11 [error] 18813#18813: *123632 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/sandbox/anything.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock:", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php?step=database"
2024/11/15 15:19:11 [error] 18813#18813: *123632 FastCGI sent in stderr: "PHP message: PHP Warning:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26" while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?compile_templates=1&bo=1 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock:", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php?step=database"
2024/11/15 15:19:17 [error] 18813#18813: *123632 FastCGI sent in stderr: "PHP message: PHP Warning:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26" while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?compile_templates=1&bo=0 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock:", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php?step=database"
2024/11/15 15:21:46 [error] 18813#18813: *123632 FastCGI sent in stderr: "PHP message: PHP Warning:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26" while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?compile_templates=1&bo=1 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock:", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php"
2024/11/15 15:21:46 [error] 18813#18813: *123632 FastCGI sent in stderr: "PHP message: PHP Warning:  Constant _PS_DO_NOT_LOAD_CONFIGURATION_ already defined in /var/www/prestashop/install/controllers/http/smarty_compile.php on line 26" while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?compile_templates=1&bo=0 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock:", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php"
2024/11/15 15:21:52 [error] 18813#18813: *123632 FastCGI sent in stderr: "PHP message: PHP Warning:  Attempt to read property "theme_name" on null in /var/www/prestashop/var/cache/prod/ContainerUQHMpD8/appAppKernelProdContainer.php on line 2871" while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?generateSettingsFile=true&_=1731684106113 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock:", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php"
2024/11/15 15:22:52 [error] 18813#18813: *123632 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 2a01:cb15:82bb:f200:a07:7e08:1cd3:fea3, server: nature.teugram.fr, request: "GET /boutique/install/index.php?installDatabase=true&_=1731684106114 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm-prestashop.sock", host: "nature.teugram.fr", referrer: "https://nature.teugram.fr/boutique/install/index.php"

OK. So I think to hava managed the timeout error. There is no more 504 error that occurs 60000ms after the GET.

In order to solve that I added the following lines :

fastcgi_read_timeout 600;
fastcgi_send_timeout 600;
fastcgi_connect_timeout 600;

at the end of the /etc/nginx/conf.d/nature.teugram.fr.d/prestashop.conf file.

Then restarted nginx service with sudo systemctl restart nginx.service.

However now I see another error :frowning: :

I found this line in the error log :

2024/11/27 08:38:46 [error] 1552#1552: *1077 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught ValueError: Epoch doesn't fit in a PHP integer in /var/www/prestashop/src/Core/Localization/CLDR/Reader.php:640

And according to this github issue it seems that it’s because my raspberry pi is 32 bit and that prestashop is not developped for that architecture.

When installing the app in the Yunohost admin panel there was no warning about this requirement.

Can someone confirm that it is not possible ? and if not I suppose changes must be made in the app package to refuse installation on 32-bit devices.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.