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

**URL:** <https://forum.yunohost.org/t/server-errors-504-500-during-prestashop-install-process-on-32-bit-device/32038>\
**Category:** Support apps\
**Tags:** prestashop, english\
**Created:** [November 15, 2024, 3:33pm UTC](https://forum.yunohost.org/t/server-errors-504-500-during-prestashop-install-process-on-32-bit-device/32038 "2024-11-15T15:33:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maphr](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@maphr](https://forum.yunohost.org/u/maphr)\
**Post date:** [November 15, 2024, 3:33pm UTC](https://forum.yunohost.org/t/server-errors-504-500-during-prestashop-install-process-on-32-bit-device/32038/1 "2024-11-15T15:33:21Z")

</div>

**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](https://forum.yunohost.org/t/504-gateway-time-out-nginx-lors-de-linstallation-prestashop-sur-webapp-custom/14982).

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 😕

 ![Capture d’écran du 2024-11-15 16-17-19](https://forum.yunohost.org/uploads/default/original/2X/1/14cd092a2ec0d5dd1ab6fffc22e74076df8e53fb.png)

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](https://www.prestashop.com/forums/topic/954847-r%C3%A9solu-erreur-504-gateway-time-out/) talks about the same 1 minute timout that I have
- this [other one](https://www.prestashop.com/forums/topic/907775-prestashop-1742-http-504-error-gateway-timeout/) 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) :

```auto
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"

```

---

<div class="post-metadata">

**Author:** ![maphr](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@maphr](https://forum.yunohost.org/u/maphr)\
**Post date:** [November 27, 2024, 9:14am UTC](https://forum.yunohost.org/t/server-errors-504-500-during-prestashop-install-process-on-32-bit-device/32038/2 "2024-11-27T09:14:13Z")

</div>

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 :

```auto
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 ☹ :

 ![Capture d’écran du 2024-11-27 10-01-27](https://forum.yunohost.org/uploads/default/original/2X/1/1edc424782fe81513767d8db613a1ac137bb5da0.png)

I found this line in the error log :

```auto
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](https://github.com/PrestaShop/PrestaShop/issues/31436#issuecomment-1446249455) 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.

---

<div class="post-metadata">

**Author:** ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)\
**Post date:** [December 12, 2024, 9:14am UTC](https://forum.yunohost.org/t/server-errors-504-500-during-prestashop-install-process-on-32-bit-device/32038/3 "2024-12-12T09:14:31Z")

</div>

Closed on December 12, 2024, 9:14am UTC

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