[Closed] Litemage 1.0.1 public cache non Warming up

Status
Not open for further replies.

wanah

Well-Known Member
#1
Hello,

We are trying litemage 1.0.1 since last night and I'm under the impression that the cache warm up feature isn't working.

I set up the following cron :

*/5 * * * * /bin/sh /home/magentouser/public_html/cron.sh

and set : Enable Cache Warm Up to Yes

Only Run When Load Is Less Than : 7 (it's always less than 7)

Maximum Run Time (seconds) : 300

But when I access the main page after leaving it for a long time it doesn't show a litespeed cache hit.

If I visit multiple pages then close the browser and access them from another browser then I git a cache hit streight away.

I've set
Code:
Enable LiteMage Cahe : yes
Default Public Cache TTL : 86400
Default Private Cache TTL : 1800
Track Recently viewsed products : Yes
Sepertage Cache copy for customized Cookie Values : empty
I'm running Magento 1.9.1.0 on PHP 5.6 and Litespeed 5 build 4 and same with build 5

I'm running for the moment with the default content in demo mode.

Here are my current cache settings :



The /lsdiskcache is a ram disk.
 
Last edited by a moderator:

Pong

Administrator
Staff member
#2
Because LiteMage is encrypted, the Magento cron.sh must use a PHP with IonCube Loader. Updating the cron.sh PHP_BIN setting to the right php, for example "PHP_BIN=/usr/local/lsws/fcgibin/lsphp5" , or other PHP you have set for your LSWS.

Flush LiteMage cache and Magento cache.

See if it works
 

wanah

Well-Known Member
#3
Thanks,

I've juste checked and it's not that. We use Cloudlinux's CageFS and phpselector and which php run as that user responds :

Code:
/usr/local/bin/php
and :

Code:
/usr/local/bin/php -m|grep ionCube
ionCube Loader
the ionCube PHP Loader
 

Pong

Administrator
Staff member
#4
Did you try "Flush LiteMage cache" and "Magento cache"?

Test you magento cron job with right user (magentouser) to make sure it works. LiteMage needs this cron to run the warmup.

Go to magento_installation_folder/var/cache

find . | grep LITEMAGE

to see if there is any warm up files generated. (none means no warmup yet)

LiteMage warm up will run at 10 minutes intervals.
 

Pong

Administrator
Staff member
#5
Also forgot to mention:
If you use Cloudlinux's CageFS, you should check your php modules by placing an phpinfo.php file into that useraccount's magento installation directory ( assuming /home/magentouser/public_html/).

Each Cage user may have different setting. Checking the global setting ( /usr/local/bin/php -m|grep ionCube ) won't help to identify the php modules for that particular user.

If PHP info page shows no ionCube for that user, you have to go into the user Cage to modify the settings.
 

wanah

Well-Known Member
#6
Hello,

Code:
php -m
lists the modules so when I ran

Code:
/usr/local/bin/php -m|grep ionCube
it showed that ionCube is installed and active.

When I flush the cache and wait for 10 minutes without visiting the site the command :

Code:
find . | grep LITEMAGE
gives no result. I waited 12 minutes (cron running every 5 minutes) and nothing.

When I manually visit the webpage I do get results.

I haven't tried yet lowering the PHP version, I will try with 5.4 to see if maybe it's an incomatibility with PHP 5.6

The cron is run because every 5 minutes I see cron.php -mdefault and cron.php -malways in the users process list.
 

wanah

Well-Known Member
#7
Just tested with PHP 5.4 and it's not any better… When the cron's running it does use up to 75% of the allowed CPU usage for this account by cloudlinux ( 2x3 GHz) but there are no failures.
 

wanah

Well-Known Member
#8
I've just thought of something, when I access the site through the webbrowser it's litespeed "nobody" user that I presume performs putting everyhing in cache.

With cagefs the user can't even see the /lsdiskcache partition that is owned by the nobody user. Does the PHP's unix user need to have read and write access to litespeed's cache folder ?
 

Pong

Administrator
Staff member
#9
Have you enable LiteMage in .htaccess?
Code:
<IfModule Litespeed>
LiteMage on
</IfModule>
also assume you run the following inside of usercage:
Code:
/usr/local/bin/php -m|grep ionCube
instead of checking the global setting.

Better place phpinfo.php file to magento directory to verify.
 
Last edited by a moderator:

wanah

Well-Known Member
#10
Hello,

Yes I'm sure IonCube is enabled and that LiteMage is on in the htaccess file.

I will hapily give litespeed access to this hosting account (ssh and magento admin) as it is a test site with no customers.

Thanks
 

Pong

Administrator
Staff member
#12
Problem resolved:

1.LiteMage enable configuration missing from .htaccess, the following has been added.

Code:
<IfModule Litespeed>

LiteMage on

</IfModule>
2. In cron.sh, `which php` needs to specify the location.
It has been changed to /usr/local/bin/php

Now warm up works.

Code:
cd var/cache
find . | grep WARMUP

$ find . | grep WARMUP
./mage--6/mage---internal-metadatas---160_LITEMAGE_WARMUP_URLMAP
./mage--6/mage---160_LITEMAGE_WARMUP_URLMAP
./mage--5/mage---160_LITEMAGE_WARMUP_META
./mage--5/mage---internal-metadatas---160_LITEMAGE_WARMUP_META
 
Last edited by a moderator:

wanah

Well-Known Member
#13
This wasn't actually working.

We've updated from build 4 to the latest build (8 I think) to see if that changes anything… It actually seems hopefull… but I'll have to wait until tomorrow to confirm if all main pages are still in cache.
 

wanah

Well-Known Member
#14
Well, I was mistaken, someone must have visited the website just before. The warm up still doesn't work. But as I don't want to give root access I will wait and see if this is fixed at a future date.

The warm up is defenetly running, it's just not staying in public cache when pulled by php alone and not pulled by an external browser.
 

Pong

Administrator
Staff member
#15
Out Lab has 1.9 magento installed with sample data setup and the Warmup run and stored in cache without any problem. Test quite a few pages and all pages were first hit from liteMage.

Not sure why you have such problem with this particular account.

You might want to try other Magneto installation to see the result.
 
Status
Not open for further replies.
Top