Jump to content

Recommended Posts

I've been trying to use the version 1.6.0.13 of prestashop, everything was going ok, however when I tryied to index the products, I got the error 500 three times and the prestashop indexed about 480 of 2700 products, since then when a tried to add missing products do the index, I receive the blank screen of death. So, I enabled the debug mode and discovered that the error is:

 

Fatal error: Out of memory (allocated 23592960) (tried to allocate 82 bytes) in /home/somedir/public_html/classes/db/DbPDO.php on line 119

 

I upgraded the version of php from 5.2 to 5.5, since then I can index about 550 products, but error still persist.

 

My web host allow me to allocate 256mb of RAM, but the error described above, is triggered when the memory is about 22,5mb.

 

When I was using the version 1.6.0.9 of prestashop everything was ok...

 

Any idea ?

 

Thanks in advance.

 

Reghyz.

Link to comment
Share on other sites

Apparently .13 is using more resources from the system, and you are running out of memory.  This could indicate a memory leak of some sort. 

 

I would report your issue to Prestashop using their Forge, PS developers do not read the forums.

If you can increase your memory to 512, try that.  Otherwise stick with .9

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

 I have three webshops losing profi because of this.

I have tried everything but this all doesn't work. Even the PHP.INI set to 256 Mb.

All the shops where tested and upgraded to 1.6.0.13 but search doesn't work (see same issues above)

 

Can anyone please tell me how I safely can downgrade to .9 please?

Edited by Miniwheels-online.com (see edit history)
Link to comment
Share on other sites

I seriously doubt .14 will reduce the memory usage issue you are encountering, its worth a try but I suspect you will need to revert to restoring from a backup, or find a way to increase the amount of memory you can use on the host.  obviously 256m is not enough

Link to comment
Share on other sites

 I have three webshops losing profi because of this.

I have tried everything but this all doesn't work. Even the PHP.INI set to 256 Mb.

All the shops where tested and upgraded to 1.6.0.13 but search doesn't work (see same issues above)

 

Can anyone please tell me how I safely can downgrade to .9 please?

Please check on tab "advanced parameter -> configuration information" if memory is really allocated to 256M. Sometimes providers do not allow to change some settings.

If it is set to 256M,. so you should have enough memory_limit, and the execution_time is not the one needed. As reindex of products needs some server resources you should set max_execution_time to 300. (I have this set to 900 for a catalog with 10.000 products and can reindex all products. It takes time, but it works).

 

A downgrade to older PS 1.6. versions will not solve your problem. Only a downgrade do PS 1.4. which don't need these server resources COULD help. But 1.4. is outdated since some years ;):D

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

the OP already stated that this issue did not exist in PS v.1.6.0.9

Which issue ?

 

If max_execution_time is set to 30 ( this is standard on Apache installation), than the Prestashop script will stop after 30 seconds to index the products, and give a time out on the server (blank screen). The reindexation script of Prestashop needs more than this 30 seconds (you can see it as a bug or not). For my catalog of 10.000 products I need the value set to 900 (300 is too not enough). 500 products with 300 execution time will be run well, but 30 not. Perhaps the made some changes on PS 1.6.0.9, but the script is also not faster on PS 1.6.0.11 or 1.6.0.14 from my experiences.

 

Best settings:

Shop under 2.000 products - 256M memory_limit and max_execution_time 300

Shop over 5.000 produtcts - 512M memory_limit and max_execution_time all up to 300

Edited by selectshop.at (see edit history)
Link to comment
Share on other sites

Hello Wuisma,

 

Thanks for the links. I've already "debugged" for my own big shop, but nothing changed. When I reduce the max_execution_time to 30 I have the same scenario: Blank page and products not reindexed. So this "fixes" do not solve the low execution time. Perhaps on a shop of 500 products, but not for a shop with 2.000 products and also not for a shop with 10.000 products.

 

In this case is better to change the value of max_execution_time to 300 instead to loose time in make manual adaptation of files.

 

Regards

Link to comment
Share on other sites

The issue

 

Which issue ?

 

If max_execution_time is set to 30 ( this is standard on Apache installation), than the Prestashop script will stop after 30 seconds to index the products, and give a time out on the server (blank screen). The reindexation script of Prestashop needs more than this 30 seconds (you can see it as a bug or not). For my catalog of 10.000 products I need the value set to 900 (300 is too not enough). 500 products with 300 execution time will be run well, but 30 not. Perhaps the made some changes on PS 1.6.0.9, but the script is also not faster on PS 1.6.0.11 or 1.6.0.14 from my experiences.

 

Best settings:

Shop under 2.000 products - 256M memory_limit and max_execution_time 300

Shop over 5.000 produtcts - 512M memory_limit and max_execution_time all up to 300

 

The OP provided the issue in the first post

Fatal error: Out of memory (allocated 23592960) (tried to allocate 82 bytes) in /home/somedir/public_html/classes/db/DbPDO.php on line 119

 

When I was using the version 1.6.0.9 of prestashop everything was ok...

 

This is simply a memory issue with .14.  While they can increase the max execution time, it would not have any effect as the process is not being killed because it ran too long, it is bombing because the php engine ran out of memory.

 

Perhaps the made some changes on PS 1.6.0.9, but the script is also not faster on PS 1.6.0.11 or 1.6.0.14 from my experiences.

It is entirely possible that .14 has introduced a memory leak, or inefficient code that does make the process utilize more memory.  It could also be a module installed now, that was not installed previously, and the OP will need to investigate that.

 

Increasing memory or restoring to your old store version is likely the best option right now if the host will not allow an increase of memory.

 

This is why you never just upgrade a store.  You always create a duplicate copy of your store (aka test store) and then upgrade the test store and actually perform testing to ensure things work properly. 

Link to comment
Share on other sites

I have 256 MB available on the server, and had succesfully a shop without problems running with 1.6.0.9. And a shop with 1.5. Upgraded both after testing (yeah, tested everything accept the indexing...).

The shop with 1.6.0.9 worked always perfectly. The 1.5 had some issues, that's why I upgraded.

I hope that this leak will be patched. But is there an option to downgrade only the involved files from 1.6.0.9 and test if that is an option?

Prestashop Store Manager PRO has an option for indexing locally and then update the database, but this also doesn't work properly.

 

Shop 1 & 2 (multishop) has approx. 3000 items

Shop 3 stand alone has approx. 2500 items

 

I will try the github links this evening, I will report what the results are, thanks for the responds!

Edited by Miniwheels-online.com (see edit history)
Link to comment
Share on other sites

I had indexing problems in a multishop and the patch I put fixed that. Of course if you have a lot of products you could need more memory and more execution time but that patch fixes a multishop indexing bug, speeds up the search, and reduce the memory usage of the indexing...
Link to comment
Share on other sites

A bit strange, but it works...

I edited the files as stated in the github listings. ran the SQL-queries.

Then I can start the link 're-build the entire index'. Get the blank screen (no worries) and return to the backoffice and add the missing items, every time some 100-150 articles are added untill everything is indexed.

 

But when I search in the front-office I get a page with the number of results and HALF of the first article listed without picture.

When I restored the search.php to the original one, it works!

 

(Now I have to rename this search.php and restore the working search.php and vv. every time I want to add new items to the index)

But it works!

 

EDIT: Isolated the problem to search.php, but I do not know where in the file. Github version works for backoffice fine, original file with .13 works fine for frontoffice

Edited by Miniwheels-online.com (see edit history)
  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

A bit strange, but it works...

I edited the files as stated in the github listings. ran the SQL-queries.

Then I can start the link 're-build the entire index'. Get the blank screen (no worries) and return to the backoffice and add the missing items, every time some 100-150 articles are added untill everything is indexed.

 

But when I search in the front-office I get a page with the number of results and HALF of the first article listed without picture.

When I restored the search.php to the original one, it works!

 

(Now I have to rename this search.php and restore the working search.php and vv. every time I want to add new items to the index)

But it works!

 

EDIT: Isolated the problem to search.php, but I do not know where in the file. Github version works for backoffice fine, original file with .13 works fine for frontoffice

 

Thank you!!

 

I had the same problem, and I used the github file of search.php to index and original file for use in frontend.

 

I hope that prestashop fix this issue.

Link to comment
Share on other sites

  • 2 weeks later...

I have a very large site. When I was using PS 1.4 and 1.5 series, I had no problems indexing 7,500 products.

Now, thanks to a crash, I had to start completely over. I downloaded PS 1.6.0.14 - this version cant even index 4,000 products.

I am running a VPS server with over 4 GB (gigabytes) of memory and a timeout of 300. This is still inadequate. There is

no reason I need more memory allocated to php to index missing products - at the moment I have tried indexing missing products

as well as rebuilding the entire index. Both timeout - even though there are only 400 items that are currently missing from the index.

 

I looked at Github - the red and green highlighted areas, I suppose, could mean "delete" and "modify/add" accordingly, but the Github

pages are really written for advanced programmers. I think Prestashop should do the right thing and create an entirely new search.php

as well as other pages that are able to be downloaded as necessary for users to get a better PS experience. We arent all advanced coderz......

Link to comment
Share on other sites

  • 3 weeks later...

Thank you SIKU - I replaced the search.php into the classes folder over the weekend.

It has improved somewhat, but there are still problems with the SEARCH function when you

reindex more than 4,000 items. the "add missing items" to search now works better, but this

function still isnt as good as previous versions.

 

I dont understand why Prestashop always tries to fix something that isnt broken.  

Link to comment
Share on other sites

I think the problem are more than change of scripts. It could be a server problem. Strange that for me replacing the files does not take any effect at all. But as I told on some topics before, my server is well configurated... Perhaps if you follow the configuration hint, you will get it. My shop has 10.000 products and a complete reindexation for the search is possible at all.

Link to comment
Share on other sites

  • 2 weeks later...

It is strange indeed that there is no solution for this.

I have a working file for you.

Just replace your original root/classes/search.php with the one I added to this post, and you are ready.

Great job.Works like charm in PS 1.6.0.14

Link to comment
Share on other sites

I tried the file that Siku uploaded, but still I have the blank screen when running a search.  This started for me when I enabled some disabled products.  I can't rebuild the index because I get a blank screen for that as well.  Maybe it isn't the Search.php file.  Are there any other files involved with indexing and search?  Furthermore, the server times out when I use the cleaner module to fix the functional integrity constraints.  That may be the problem for me.  How can I do this from phpMyadmin?

Link to comment
Share on other sites

It is strange indeed that there is no solution for this.

I have a working file for you.

Just replace your original root/classes/search.php with the one I added to this post, and you are ready.

Thank you Siku! This file solves the problem.

Link to comment
Share on other sites

It is strange indeed that there is no solution for this.

I have a working file for you.

Just replace your original root/classes/search.php with the one I added to this post, and you are ready.

THANKS, DUNNO WHAT YOU DID BUT replacing this file on my server SOLVED THE PROBLEM!

Re-indexing working like a charm. This is not a problem memory, I tried everything regarding memory and php.ini but the only thing that solved this problem was replacing the search.php with the file posted previously in this thread. Thank you so much

Link to comment
Share on other sites

It is strange indeed that there is no solution for this.

I have a working file for you.

Just replace your original root/classes/search.php with the one I added to this post, and you are ready.

Muchas gracias!

Me funciono en Prestashop.1.6.0.14

Link to comment
Share on other sites

  • 3 months later...
×
×
  • Create New...