Jump to content

prestashop 1.7.6.7 to 1.7.8 - 1-click upgrade module failed - too many open files


user2020

Recommended Posts

I tried to upgrade prestashop from 1.7.6.7 to 1.7.8 and the activity log showed the following:

File will be saved in /home/customer/www/<redacted data>/public_html/admin459/autoupgrade/download/prestashop.zip
Download directory has been emptied
Download complete.
"/latest" directory has been emptied
Content of archive /home/customer/www/redacted data>/public_html/admin459/autoupgrade/download/prestashop.zip is extracted
[INTERNAL] /home/customer/www/<redacted data here>/public_html/modules/autoupgrade/classes/ZipAction.php line 154 - ZipArchive::extractTo(/home/customer/www/<redacted data>/public_html/admin459/autoupgrade/latest/localization/CLDR/core/common/supplemental/grammaticalFeatures.xml): failed to open stream: Too many open files

----------------------------------

Errors:

Could not extract localization/CLDR/core/common/supplemental/grammaticalFeatures.xml from backup, the destination might not be writable.

Can anyone advise why it failed and what the fix is?

Thanks.

Link to comment
Share on other sites

  • 3 weeks later...
On 11/2/2021 at 4:44 PM, JBW said:

Some Hostings have a file limit and you might exceed it - contact your hosting company regarding this

I am facing the same problem when updating from 1.7.8.0 to 1.7.8.1. I get HTTP 500 ERROR and the log investigation says that I am opening more than 4096 files when clicking 1-click upgrade in the admin back office section of PrestaShop. It is weird! I am using SiteGround and find it rediculous as I am running a small online shop with 82 registered users only. So, I am currently looking for another hosting provider than can offer me a VPS without all those core limitations as I currently experience at SiteGround, even though I have paid SiteGround for a 3 year subscription that is ending on May 1st 2023. So, if anyone have a good tip to give me about a provider that does not make such irritable limitations, I am open for receiving proposals. Everything with SiteGround was more or less fine until PrestaShop released the 1.7.8.0 version that requires a huge amount of files being open at the same time. 

Link to comment
Share on other sites

2 hours ago, Vidar Bjerkeland said:

I am facing the same problem when updating from 1.7.8.0 to 1.7.8.1. I get HTTP 500 ERROR and the log investigation says that I am opening more than 4096 files when clicking 1-click upgrade in the admin back office section of PrestaShop. It is weird! I am using SiteGround and find it rediculous as I am running a small online shop with 82 registered users only. So, I am currently looking for another hosting provider than can offer me a VPS without all those core limitations as I currently experience at SiteGround, even though I have paid SiteGround for a 3 year subscription that is ending on May 1st 2023. So, if anyone have a good tip to give me about a provider that does not make such irritable limitations, I am open for receiving proposals. Everything with SiteGround was more or less fine until PrestaShop released the 1.7.8.0 version that requires a huge amount of files being open at the same time. 

I contacted siteground about my problem and they changed some configuration settings that didn't fix my issue. I ended up doing a manual upgrade but be warned you'll run into other issues during it.  I backed up my prestashop files and database before doing the manual upgrade.

 

 

Link to comment
Share on other sites

On 11/20/2021 at 4:38 PM, Vidar Bjerkeland said:

I am using SiteGround

I've experienced the same issue on Siteground on a shared account. On the cloud packages you can modify this configuration as you with. 

On 11/20/2021 at 4:38 PM, Vidar Bjerkeland said:

and find it rediculous as I am running a small online shop with 82 registered users only

What I find ridiculous is that the 1-click upgrade module needs to open more than 5k files. That's crazy and should be improved on the module. 

Edited by w3bsolutions (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

In my case, the same problem. 1-Click Upgrade doesn´t work on Siteground server, just confirmed by his Technical Service (Too many files open, only is possible 4096 files open in one process)

Only is possible a manual upgrade. Attention for current and new users with Prestashop on Siteground server, take into account.

Regards.

----

Tengo el mismo problema. Con el módulo 1-Click no se puede actualizar a la versión 1.7.8.2, recién confirmado por su Servicio Técnico. (Muchos ficheros abiertos en el mismo proceso, solo pueden como máximo 4096 ficheros abiertos).

Solo es posible haciendo una actualización manual. Tener en cuenta para actuales y futuros usuarios de Prestashop con servidor en Siteground.

Saludos.

Link to comment
Share on other sites

  • 2 weeks later...
19 hours ago, jmm.it said:

I'm on SG and obviously I have the same problem.

Quite ridicolous, though.

I hope the dev team takes this into account seriously.

I have several shops on SG Startup Plan too. The shops are working fine for the traffic they have, so imho no need to change hosting plans just to be able to upgrade. My workaround so far, which is pretty straightforward: 

  1. Download latest version of Prestashop zip: https://www.prestashop.com/en/versions 
  2. Login to your Site Tools and go to the Files Explorer /public_html/[admin_directory/autoupgrade/latest and upload the zip there 
  3. Extract zip, which contains another prestashop zip, extract it as well.
  4. Move all prestashop folders and files from the extracted zip to hang directly from the /latest directory (where you uploaded the zip). Although they are many files, you can select them all and move (or drag and drop) in Site Tools and it takes just a couple seconds to move them.
  5. Go to the auto upgrade module configuration change, hit on "Expert mode", pick "Local Directory" channel and type the version of prestashop you are upgrading too. For the current version this would look like this:1447440178_Screenshot2021-12-21at11_40_25.thumb.png.7f6dd7fc8b6d4705c1da1ba3ec26b08d.png
  6. Hit "Save" and upgrade works fine. 

Cheers.

 

Link to comment
Share on other sites

17 minutes ago, w3bsolutions said:

I have several shops on SG Startup Plan too. The shops are working fine for the traffic they have, so imho no need to change hosting plans just to be able to upgrade. My workaround so far, which is pretty straightforward: 

  1. Download latest version of Prestashop zip: https://www.prestashop.com/en/versions 
  2. Login to your Site Tools and go to the Files Explorer /public_html/[admin_directory/autoupgrade/latest and upload the zip there 
  3. Extract zip, which contains another prestashop zip, extract it as well.
  4. Move all prestashop folders and files from the extracted zip to hang directly from the /latest directory (where you uploaded the zip). Although they are many files, you can select them all and move (or drag and drop) in Site Tools and it takes just a couple seconds to move them.
  5. Go to the auto upgrade module configuration change, hit on "Expert mode", pick "Local Directory" channel and type the version of prestashop you are upgrading too. For the current version this would look like this:1447440178_Screenshot2021-12-21at11_40_25.thumb.png.7f6dd7fc8b6d4705c1da1ba3ec26b08d.png
  6. Hit "Save" and upgrade works fine. 

Cheers.

 

Thank you for advise, however SiteGround does not allow to open the 1-click upgrade module from the admin section of PrestaShop. It was possible to open 1-click upgrade prior to  module vers.. v4.13.0 - by PrestaShop, but with this version, not possible. Getting a HTTP 500 ERROR at once.

Link to comment
Share on other sites

12 minutes ago, w3bsolutions said:

I have several shops on SG Startup Plan too. The shops are working fine for the traffic they have, so imho no need to change hosting plans just to be able to upgrade.

 

Funny thing I don't even have a StartUp plan, I have a PS shop in a GoGeek slot. I don't blame SG, it's a PS dev fault here.

I have several WP installs on the same SG account, some of them huge and complicated, I have only had issues with this PS (specifically after migrating to 1.7) and now this thing with the updates. No way.

@w3bsolutions I know the manual update process, have used it in the past (these troubles with 1-click module are not a first) but I still think something should be done to fix this.

Link to comment
Share on other sites

10 minutes ago, Vidar Bjerkeland said:

Thank you for advise, however SiteGround does not allow to open the 1-click upgrade module from the admin section of PrestaShop. It was possible to open 1-click upgrade prior to  module vers.. v4.13.0 - by PrestaShop, but with this version, not possible. Getting a HTTP 500 ERROR at once.

I had this issue also with one shop, where I couldn't open the autoupgrade config page directly, I was already getting the "too many open files" (500 error) directly. I did some debugging and it turns out when you open the page it runs some tests on your installation. Some of these tests just check if directories are writable, and specifically one of the tests checks if each directory in the /img directory is writable... recursively. This shop had several thousand images (more than 4096) and it was breaking there. So I created an override to disable the recursively in this test, and then I could open the autoupgrade configuration page fine. 

Attached is the override. If you want to test it, just place it under /override/classes. Note that in this shop this test was the problematic one, but there are other tests it is running that are also still using recursivity on nested directories, so they could also give problems. You can see which ones exactly in /classes/ConfigurationTest.php. All the tests in there are executed when you open the autoupgrade configuration page. 

P.S. It is giving an error when uploading the PHP override, so I just put it in a zip to overcome this.

ConfigurationTest.php.zip

Edited by w3bsolutions
Attach override. (see edit history)
Link to comment
Share on other sites

10 minutes ago, jmm.it said:

@w3bsolutions I know the manual update process, have used it in the past (these troubles with 1-click module are not a first) but I still think something should be done to fix this.

I agree with you 100%. But unfortunately Prestashop core developers don't check the forums. So you have to open an issue at https://github.com/PrestaShop/PrestaShop if you want any feedback from them.

Link to comment
Share on other sites

7 hours ago, w3bsolutions said:

I had this issue also with one shop, where I couldn't open the autoupgrade config page directly, I was already getting the "too many open files" (500 error) directly. I did some debugging and it turns out when you open the page it runs some tests on your installation. Some of these tests just check if directories are writable, and specifically one of the tests checks if each directory in the /img directory is writable... recursively. This shop had several thousand images (more than 4096) and it was breaking there. So I created an override to disable the recursively in this test, and then I could open the autoupgrade configuration page fine. 

Attached is the override. If you want to test it, just place it under /override/classes. Note that in this shop this test was the problematic one, but there are other tests it is running that are also still using recursivity on nested directories, so they could also give problems. You can see which ones exactly in /classes/ConfigurationTest.php. All the tests in there are executed when you open the autoupgrade configuration page. 

P.S. It is giving an error when uploading the PHP override, so I just put it in a zip to overcome this.

ConfigurationTest.php.zip 830 B · 1 download

Hello, thank you for the advices. Do you provide assistance on the matter? I would like the problem to be solved so I can continue to use SiteGround's server. I have paid them upfront the server capacity until the summer 2023. Please reply or send me a message privately. My online shop is https://racinghorses.eu.

 

Link to comment
Share on other sites

2 hours ago, Vidar Bjerkeland said:

I have paid them upfront the server capacity until the summer 2023

Well you should pay yearly as servers are not always stable and can experience rather nasty outages. Look at OVH.

Funny enough I @ host at a latvian server which runs still hdd but that has a much lesser impact.

Edited by Nickz (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...
  • 7 months later...
On 12/21/2021 at 12:13 PM, w3bsolutions said:

I had this issue also with one shop, where I couldn't open the autoupgrade config page directly, I was already getting the "too many open files" (500 error) directly. I did some debugging and it turns out when you open the page it runs some tests on your installation. Some of these tests just check if directories are writable, and specifically one of the tests checks if each directory in the /img directory is writable... recursively. This shop had several thousand images (more than 4096) and it was breaking there. So I created an override to disable the recursively in this test, and then I could open the autoupgrade configuration page fine. 

Attached is the override. If you want to test it, just place it under /override/classes. Note that in this shop this test was the problematic one, but there are other tests it is running that are also still using recursivity on nested directories, so they could also give problems. You can see which ones exactly in /classes/ConfigurationTest.php. All the tests in there are executed when you open the autoupgrade configuration page. 

P.S. It is giving an error when uploading the PHP override, so I just put it in a zip to overcome this.

ConfigurationTest.php.zipUnavailable

Hallo, its not possible open your file.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...