Jump to content

Out of resources when opening file Error?


Recommended Posts

Hi everyone,

Very new to Prestashop but am almost there in setting up my first shop. I am due to go live but the back-end has just started throwing up the following error everytime I try to save a product (new and update). It seems to be a problem with accessing a temp file. Has anyone come across it and is there a fix for it? I cannot find anything about this on the forums.

Array
(
   [0] => Out of resources when opening file './web39@002dlapshop/ps_lapshop2search_word.MYD' (Errcode: 24)
   [1] => Array
       (
           [0] => (274,(SELECT id_word FROM ps_lapshop2search_word WHERE word = 'compaq' AND id_lang = 1 LIMIT 1),51)
           [1] => (274,(SELECT id_word FROM ps_lapshop2search_word WHERE word = 'presario' AND id_lang = 1 LIMIT 1),31)
           [2] => (274,(SELECT id_word FROM ps_lapshop2search_word WHERE word = 'v3010us' AND id_lang = 1 LIMIT 1),23)
           [3] => (274,(SELECT id_word FROM ps_lapshop2search_word WHERE word = 'battery' AND id_lang = 1 LIMIT 1),13)
           [4] => (274,(SELECT id_word FROM ps_lapshop2search_word WHERE word = 'cell' AND id_lang = 1 LIMIT 1),1)
           [5] => (274,(SELECT id_word FROM ps_lapshop2search_word WHERE word = 'type' AND id_lang = 1 LIMIT 1),1)
           [6] => (274,(SELECT id_word FROM ps_lapshop2search_word WHERE word = 'liion,' AND id_lang = 1 LIMIT 1),1)
           [7] => (274,(SELECT id_word FROM ps_lapshop2search_word WHERE word = '12cells' AND id_lang = 1 LIMIT 1),1)



Thanks in advance.

Link to comment
Share on other sites

Still trying to find out what the source of this issue is. Does anyone know what this file is for ps_lapshop2search_word.MYD ? Prestashop seems to be running out of resources when trying to open this file. I reckon if I delete the contents in this file it should work again.

Just a recap, I can add and update products, but when I click save it throws up the above error yet still updates the product catalog.

P.S - The "lapshop" part of the filename ps_lapshop2search_word.MYD is probably just pulling my site name.

Link to comment
Share on other sites

That is a mySQL database table search_word for your Prestashop installation.
Seems ther ehave been a lot of searches on your site. I would do a repair table in phpMyAdmin to help correct the issue and then clear it out. I'[m not sure if it is safe, however to clear it. Someone else will have to answer that.

Link to comment
Share on other sites

That is a mySQL database table search_word for your Prestashop installation.
Seems ther ehave been a lot of searches on your site. I would do a repair table in phpMyAdmin to help correct the issue and then clear it out. I'[m not sure if it is safe, however to clear it. Someone else will have to answer that.


Thanks a lot dude, that does make sense. Though I do find it weird that prestashop would try to access this table when saving or updating a product :S Am I the only one who has had this issue?

There can't have been lot of searches though, as my site is still in development. But the error array does show 4107 entries in it. :-|

Before I take the risk of deleting the entries in this table, I am open for other views on this matter.
Link to comment
Share on other sites

Below is what my server company had to say on this -


I have checked ps_lapshop2search_word within the database and am unable to replicate any issues with accessing it directly, which indicates this may be a scripting issue.

Unfortunately, we are limited on the amount of scripting support we are able to offer, so it may be worth asking the developers of the script it they are aware of this issue and if there is anything that can be done to correct it. Should they require any server information, please let me know.
Link to comment
Share on other sites

I believe it rebuilds the search index when it adds a product.


That definitely narrows it down, having had a look at Preferences > Search, I can see that only 247 out of 340 records have been indexed. So the error message indicates that it cannot index the new entry.

There is a seperate table for indexing called ps_lapshop2search_index

PHPAdmin shows the below for the 2 tables. They both seem to be huge and also have pretty big overheads.

ps_lapshop2search_index Records - 35,578 Size - 2.0 MiB Overhead - 407.1 KiB
ps_lapshop2search_word Records - 20,619 Size - 1.0 MiB Overhead - 9.6 KiB

Clearing these tables would probably not resolve the issue, as when I re-build the index, I will probably come across this issue again :s
Link to comment
Share on other sites

Hi guys,

I believe it rebuilds the search index when it adds a product.


Yes you're right, we are using this table in order to improve the search experience for users.

Each time you add/modify a product, the index is updated too.

@niroism, you should:

1. try to alter this table (ALTER TABLE ps_search_word in your phpMyAdmin)
2. go to your admin panel in the search tab and click on "rebuild index" (this might take a few minutes)
3. check if the index is OK

Regards,
Link to comment
Share on other sites

Hi guys,

I believe it rebuilds the search index when it adds a product.


Yes you're right, we are using this table in order to improve the search experience for users.

Each time you add/modify a product, the index is updated too.

@niroism, you should:

1. try to alter this table (ALTER TABLE ps_search_word in your phpMyAdmin)
2. go to your admin panel in the search tab and click on "rebuild index" (this might take a few minutes)
3. check if the index is OK

Regards,


Hi Bruno, did try to re-build the index and it throws up the same error.
Link to comment
Share on other sites

I'm not all that familiar with how PS does it's search indexing so I don't know if you can delete all the records and then rebuild the index.
I would try exporting the tables, use REPAIR TABLE on them, then clear them and then rebuild the indexes.


Worth a try, will post update on how that progresses. Thanks.
Link to comment
Share on other sites

I'm not all that familiar with how PS does it's search indexing so I don't know if you can delete all the records and then rebuild the index.
I would try exporting the tables, use REPAIR TABLE on them, then clear them and then rebuild the indexes.


Update - Deleted both tables and re-indexed. Still producing same error.
Link to comment
Share on other sites

At the moment you should try to disable the search feature?


It is a shop that sells laptop parts, disabling search feature would not be user friendly and not really an option. I really do need to fix it. There are no errors on the front page, just in the admin while creating the index, disabling the search feature will still throw errors wouldn't it?
Link to comment
Share on other sites

At the moment you should try to disable the search feature?


It is a shop that sells laptop parts, disabling search feature would not be user friendly and not really an option. I really do need to fix it. There are no errors on the front page, just in the admin while creating the index, disabling the search feature will still throw errors wouldn't it?


Switch to an hosting provider which succeed to handle MySQL correctly? ;) ;)

You may contact their support regarding this issue, if you don't find a solution contact me via PM.

Regards,
Link to comment
Share on other sites

Update - Deleted both tables and re-indexed. Still producing same error.


Did you run REPAIR TABLE?


Yep Export ->Repair -> Delete -> Re-Index


Nope, go into phpMyAdmin and enter in the SQL tab:
"REPAIR TABLE tablename" (replace tablename with your table name)


Apologies dude, that is what I meant.

Backed up the table using export, ran the repair command on the table, tried re-indexing it threw up the error again, so deleted the contents of the table and re-indexed again. It populates the table with the same number of records as before and then throws up the same error.
Link to comment
Share on other sites

At the moment you should try to disable the search feature?


It is a shop that sells laptop parts, disabling search feature would not be user friendly and not really an option. I really do need to fix it. There are no errors on the front page, just in the admin while creating the index, disabling the search feature will still throw errors wouldn't it?


Switch to an hosting provider which succeed to handle MySQL correctly? ;) ;)

You may contact their support regarding this issue, if you don't find a solution contact me via PM.

Regards,


Thanks Bruno, helpful as they have been, they are pretty clueless as to what the fault could be, below is what they had to say:

I have checked ps_lapshop2search_word within the database and am unable to replicate any issues with accessing it directly, which indicates this may be a scripting issue.

Unfortunately, we are limited on the amount of scripting support we are able to offer, so it may be worth asking the developers of the script it they are aware of this issue and if there is anything that can be done to correct it. Should they require any server information, please let me know.

Link to comment
Share on other sites

Try this code to see if it alleviates the problem.
This code drops the search tables and recreates them.

DROP TABLE IF EXISTS `ps_search_index`;
CREATE TABLE `ps_search_index` (
   `id_product` INT(11) UNSIGNED NOT NULL,
   `id_word` INT(11) UNSIGNED NOT NULL,
   `weight` TINYINT(4) NOT NULL DEFAULT '1',
   PRIMARY KEY (`id_word`, `id_product`)
)
ENGINE=MyISAM
ROW_FORMAT=DEFAULT;

DROP TABLE IF EXISTS `ps_search_word`;
CREATE TABLE `ps_search_word` (
   `id_word` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
   `id_lang` INT(10) UNSIGNED NOT NULL,
   `word` VARCHAR(15) NOT NULL,
   PRIMARY KEY (`id_word`),
   UNIQUE INDEX `id_lang` (`id_lang`, `word`)
)
ENGINE=MyISAM
ROW_FORMAT=DEFAULT;

Link to comment
Share on other sites

Try this code to see if it alleviates the problem.
This code drops the search tables and recreates them.

DROP TABLE IF EXISTS `ps_search_index`;
CREATE TABLE `ps_search_index` (
   `id_product` INT(11) UNSIGNED NOT NULL,
   `id_word` INT(11) UNSIGNED NOT NULL,
   `weight` TINYINT(4) NOT NULL DEFAULT '1',
   PRIMARY KEY (`id_word`, `id_product`)
)
ENGINE=MyISAM
ROW_FORMAT=DEFAULT;

DROP TABLE IF EXISTS `ps_search_word`;
CREATE TABLE `ps_search_word` (
   `id_word` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
   `id_lang` INT(10) UNSIGNED NOT NULL,
   `word` VARCHAR(15) NOT NULL,
   PRIMARY KEY (`id_word`),
   UNIQUE INDEX `id_lang` (`id_lang`, `word`)
)
ENGINE=MyISAM
ROW_FORMAT=DEFAULT;



Cheers dude, but that hasn't worked either. Waiting for some feedback from my hosts. Will update this thread when I get something from them. Greatly appreciate your help so far.
Link to comment
Share on other sites

  • 7 months later...

I got the same problem today and noticed that there was a difference between the number of product indexed and the number of index really present in the database.
My solution was to force the index value for each product from zero to one
UPDATE `ps_product` SET `indexed` = 1 WHERE `indexed` = 0
This solved my problem.

Hope it can help.

Chris.

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...