Jump to content

smarty_lazy_cache' doesn't exist


Recommended Posts

Hi,

 

I recently started to get errors on updating quantities for example, with a blank page.

I've also seen error in my bridge connection to my prestashop manager software.

 

After a few verification, it seems (maybe among other possible issues too) that my table smarty_lazy_cache' doesn't exist.

 

So I went into MYPHPADMIN to create it, but it fails and says:

#1813 - Tablespace for table

 

To cut the story it seems that:

Creating the table fails and says "already exists"

Erasing/droping the table fails and says "table doesn't exist"

 

So its a never-ending story.

 

Any ideas on why in the first place my table smarty_lazy_cache went missing?

And how to fully remove the old one, so I can create a new one that would, I guess, fix the issue?

 

Any help/ideas welcome

 

Regards

 

En français au cas ou :

Ma table smarty_lazy_cache a disparu (mystère!)

En essayant de la creer manuellement dans MYPHPADMIN, je ne peux pas car on m'indique qu'elle existe deja.

En essayant de l'effacer, je ne peux pas car on m'indique qu'elle n'existe pas!

Bref le serpent se mord la queue la...

 

Des idées?

 

En inspectant un backup, il y existe pourtant bien une trace de cette table dans le backup...

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

Thanks but this is the first thing i did.

Doing this do what I described in my post.

Table cannot be created (already exist although it's invisible)

Table cannot be erased (doesn't exist)

 

I have 2 other stores running prestashop, and they both have the smarty_lazy_cache table...

Link to comment
Share on other sites

If you are upgrading your products with the store manager, so you should contact the support of eMagic. The Prestashop Manager uses own scripts. I think the error is another and not lazy_cache. Store Manager is latest version ?

 

The lazy_cache problem is due to failed upgrades. You did one ? Check direct in the database, if the tables are available. (in a database there is nothing invisible, the only things which could be "invisible" are reserved data places - ID's in this case, but never tables.) Tables could be active or inactive, but not invisible. Tables could receive permissions, but I don't think that somebody has given permissions to access only parts or your database. I presume you are the only one with access to your database ? Or is there somebody else managing your databases ?

Link to comment
Share on other sites

BTW you are using own theme ? What happens, when you disable smarty cache ? Tab Advanced Parameters -> performance -> section Smarty - cache=NO.

 

You are using other caching ? Same site, section Caching (last section). Disable this as well. And see if your errors disappear. It the tables are in database, you are using own theme and made an upgrade, it could be a problem of theme incompatibility and smarty cache.

Link to comment
Share on other sites

BTW you are using own theme ? What happens, when you disable smarty cache ? Tab Advanced Parameters -> performance -> section Smarty - cache=NO.

 

You are using other caching ? Same site, section Caching (last section). Disable this as well. And see if your errors disappear. It the tables are in database, you are using own theme and made an upgrade, it could be a problem of theme incompatibility and smarty cache.

Thank you for your reply.

We are indeed using our own theme.

I have tried to disable both cache (smarty and the one at the bottom), edit quantities on a product for example, via the back office online (no manager for this test here), still gives a blank page.

 

When I said "invisible", it's because creating the table manually smarty-lazy is impossible, as it says "already exists". But I tripled checked, no such table exists in my DB in MYPHP.

Erasing/droping it via MYPHP gives me an error, saying table doesn't exist this time.

 

Was on the line with my Host OVH tech support, he couldn't figure it out himself, and passed it on to his superior.

This is very weird.

 

3 other prestashop with the exact same custom theme, and install are currently working fine, and do have the table smarty_lazy_cache!

 

Also as you mentioned, no failed upgrade were made on this site. (v1.6.1.10)

 

Hmmmmmm, running out of option here! LOL 

Link to comment
Share on other sites

The problem you are having is coming from the theme in use. Some overrides or changes made, which are not compatible with the cache on your server. The controller is always checking the THEME

foreach ($products as &$product) {
if (!$this->isCached(PS_THEME_DIR.

Did you activate debug mode ? Blank page should give in debug mode more information.

 

https://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information-blank-page-500-internal-server-error/

Link to comment
Share on other sites

The problem you are having is coming from the theme in use. Some overrides or changes made, which are not compatible with the cache on your server. The controller is always checking the THEME

foreach ($products as &$product) {
if (!$this->isCached(PS_THEME_DIR.

Did you activate debug mode ? Blank page should give in debug mode more information.

 

https://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information-blank-page-500-internal-server-error/

 

So, OVH Server tech managed to make the table smarty_lazy_cache appear again in my database.

 

HOWEVER...(because it couldnt be that easy...) I have still the blank page upon updating a quantity product in the back office.

In debug mode, here is what I have now:

 

Tablespace has been discarded for table 'pre2028_smarty_lazy_cache'

 

DELETE FROM `pre2028_smarty_lazy_cache`

WHERE template_hash='a2fc420d99dca09bb5cdbaa4aa36cf6e' AND cache_id LIKE "blockbestsellers-col%"

 

And in my PHPMYADMIN, I also have this now (after the OVH Tech did his repair):

 

Warning in ./libraries/dbi/DBIMysqli.class.php#258

 

 mysqli_query(): (HY000/1814): Tablespace has been discarded for table 'pre2028_smarty_lazy_cache'

 

Backtrace

 

./libraries/dbi/DBIMysqli.class.php#258: mysqli_query(

object,

string 'SELECT COUNT(*) FROM `high5store16`.`pre2028_smarty_lazy_cache`',

integer 0,

)

./libraries/DatabaseInterface.class.php#183: PMA_DBI_Mysqli->realQuery(

string 'SELECT COUNT(*) FROM `high5store16`.`pre2028_smarty_lazy_cache`',

object,

integer 1,

)

./libraries/DatabaseInterface.class.php#1796: PMA_DatabaseInterface->tryQuery(

string 'SELECT COUNT(*) FROM `high5store16`.`pre2028_smarty_lazy_cache`',

NULL,

integer 1,

boolean false,

)

./libraries/Table.class.php#582: PMA_DatabaseInterface->fetchValue(string 'SELECT COUNT(*) FROM `high5store16`.`pre2028_smarty_lazy_cache`')

./libraries/structure.lib.php#1258: PMA_Table::countRecords(

string 'high5store16',

string 'pre2028_smarty_lazy_cache',

boolean true,

boolean false,

)

./libraries/structure.lib.php#1139: PMA_getValuesForInnodbTable(

array,

boolean true,

double 884736,

)

./db_structure.php#166: PMA_getStuffForEngineTypeTable(

array,

boolean false,

boolean true,

boolean false,

double 884736,

double 0,

)

 

At this point I'm running out of idea really...

I have 2 other prestashop store running the same theme, same install, and working absolutely fine... This is beyond me.

 

Note: blank page only appears in the back office upon updating product infos. Front office is fine.

 

Thanks a lot

Link to comment
Share on other sites

1) Tablespace has been discarded for table means that there is something missing in database library. Database has broken. OVH did not repaired the database ? If not, you should repair it by yourself with phpMyAdmin.  https://www.siteground.com/tutorials/phpmyadmin/phpmyadmin_optimize_database.htm

 

Broken database tables could happen at any time. So if you are using the same theme on other shops, this does not mean nothing. You should observe if this problem occur constantly. Scripts interact with database, database sends data to script. If the interaction is disrupted somewhere, than things go down. Also wrong deletion or adds into database can break tables.

 

After database is repaired and you are still having problems:

2) Delete manually on FTP all folders in cache/smarty/cache/blockbestsellers_home and blockbestsellers_tab

Delete manually on FTP all folders in cache/smarty/compile, DON'T delete the file "last_flush" there

 

For all what you do: database repair, deletion of files or folders, always make a back-up before !!

Link to comment
Share on other sites

Hello again,

 

First let me thank you for your time.

 

So..

1) I tried to repair the table, and got the following message:

 

high5store16.pre2028_smarty_lazy_cache repair Warning InnoDB: Tablespace has been discarded for table 'pre2028_smarty_lazy_cache' high5store16.pre2028_smarty_lazy_cache repair note The storage engine for the table doesn't support repair

 

2) No blockbestsellers_home and tab in the folder you mentioned.

 

3) tried to delete folders in cache/smarty/compile and got this message:

Message du serveur : Can't change directory to /www/store/cache/smarty/compile/03/cd/b2: No such file or directory

Erreur -125 : remote chdir failed
 
Great isn't it??  
 
What I did also, is that with the DEBUG True, I removed the modules causing error on the ActionProductUpdate hook. (there were bestseller, special, homefeatured, same category, new products)
Editing a product and saving is now working fine. No blank page anymore and no error on DEBUG.
 
But the issue with the Table Smarty_lazy_cache remains...
(my bride connector with Prestashop manager now gives me the following error whenever I pull data from the web in their software. I'm waiting on their reply on this:
{"response_code":19,"message":"Error selecting data from table `pre2028_smarty_lazy_cache`. Error: 1814; Tablespace has been discarded for table 'pre2028_smarty_lazy_cache'"}
 
Best regards,
Link to comment
Share on other sites

The first error is due to an incompatible/corrupted script (some changes made, or script broken - see # 8 - the controller.php is always checking the theme and modules when writing product data). Unfortunately, remote diagnosis here is difficult

 

This error: Erreur -125 : remote chdir failed says that you don't have permission for that. I'm too on OVH, but on root server (dedicated). Seems you are using webhost package ?

 

The problem of lazy_cache I cannot solve for you. Perhaps it is coming from Store Manager. The store manager uses own scripts for to write data into database. You are using the latest Store Manager version ? Best is you ask for support of eMagic. I'm expert user for Store Manager, but never faced with the same problem. In none of the stores I'm managing (mine and of my customers).

Link to comment
Share on other sites

Yeah, this is very weird indeed.

I'm going to wait to hear back from both eMagic and OVH support and see what they say.

Worst case scenario, I will create a new presatshop install, import my custom theme (export/import custom theme works if I'm correct) and migrate my customers/orders/products to the new fresh install/DB.

 

Again, thanks a lot for your replies, appreciate it.

I will post whatever happen here, just in case it might help people for future,

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...