Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
litespeed_wiki:cache:litemage:troubleshooting:warmup [2018/06/26 15:21]
Jackson Zhang [Enabling Cache for Logged-in Users]
litespeed_wiki:cache:litemage:troubleshooting:warmup [2019/06/19 19:00]
Jackson Zhang [Magento system scheduler ''litemage_warmup_cache'' hangs]
Line 229: Line 229:
  
 ===== Warm Up Still Not Working ===== ===== Warm Up Still Not Working =====
-If you have tried all of the above and LiteMage is still not working properly and showing the Warm-up List details, it is likely that incorrect values in Magento'​s Cron (Scheduled Tasks) setting is blocking cron jobs.+==== Magento System Cron issue ==== 
 +If you have triell ​of the above and LiteMage is still not working properly and showing the Warm-up List details, it is likely that incorrect values in Magento'​s Cron (Scheduled Tasks) setting is blocking cron jobs.
  
 We suggest returning these settings, located under **System > Configuration > Advanced > System > Cron (Scheduled Tasks)**, to their defaults below to fix the problem. ​ We suggest returning these settings, located under **System > Configuration > Advanced > System > Cron (Scheduled Tasks)**, to their defaults below to fix the problem. ​
Line 274: Line 275:
   dealwel+ 4489 1 10 04:23 pts/0 00:00:17 /​usr/​local/​lsws/​fcgi-bin/​lsphp5 /​home/​dealwellne/​domains/​example.com/​public_html/​cron.php   dealwel+ 4489 1 10 04:23 pts/0 00:00:17 /​usr/​local/​lsws/​fcgi-bin/​lsphp5 /​home/​dealwellne/​domains/​example.com/​public_html/​cron.php
  
-We did see some case that system cron seems to be showing in the cron log in /​var/​log/​cron but actually there is no such progress running. It did start to run when we change to documentroot and manuualy ​run the cron job.+==== cron.sh script issue ==== 
 +We did see some case that system cron seems to be showing in the cron log in /​var/​log/​cron but actually there is no such progress running. It did start to run when we change to documentroot and manually ​run the cron job.
        
 vi /​home/​dealwellne/​domains/​example.com/​public_html/​ vi /​home/​dealwellne/​domains/​example.com/​public_html/​
Line 310: Line 312:
     fi     fi
   fi   fi
 +==== Magento system scheduler ''​litemage_warmup_cache''​ hangs ====
 +There is one use case related to Magento system scheduler. The user does see litemage_warmup_cache scheduled but it actually hangs there.
  
 +If you go to Magento Admin -> Scheduler -> Scheduler Timeline, you might see a long cross line for ''​litemage_warmup_cache''​ either in red or orange color, it actually means the cron hangs instead of running ok. 
 +{{ :​litespeed_wiki:​cache:​litemage:​troubleshooting:​781630-6-scheduler-stunck.png?​800 |}}
 +
 +or
 +{{ :​litespeed_wiki:​cache:​litemage:​troubleshooting:​781630-6-scheduler-stunck-2.png?​800 |}}
 +
 +The user goes to Magento Admin -> System -> Scheduler -> Job Configuration,​ select ''​litemage_warmup_cache''​ then right top conner Actions for ''​Run now'',​ then ''​Submit''​.
 +{{ :​litespeed_wiki:​cache:​litemage:​troubleshooting:​781630-8-scheduler-runnow.png?​800 |}}
 + 
 +then check the litemage cron log by:
 +  tail -f /​home/​user1/​public_html/​var/​log/​litemage_crawler.log
 +
 +  2019-05-29T10:​14:​21+00:​00 DEBUG (7): LiteMage [cron:​user1:​1559124843] ​ Generate url map for store1 url count=5320
 +  2019-05-29T10:​14:​21+00:​00 DEBUG (7): LiteMage [cron:​user1:​1559124843] ​ litemage_runner crawling ​ store1 urls (cur_pos:0) with cookie ​
 +  litemage_cron=store1;​ Array
 +  LiteMage [cron:​user1:​1559124843] ​  (
 +  LiteMage [cron:​user1:​1559124843] ​      [0] => https://​www.example.com/​
 +  LiteMage [cron:​user1:​1559124843] ​      [1] => https://​www.example.com/​business-office-writing/​
 +  LiteMage [cron:​user1:​1559124843] ​      [2] => https://​www.example.com/​business-office-writing/​conference-business/​business-card-holders/​
 +  LiteMage [cron:​user1:​1559124843] ​      [3] => https://​www.example.com/​business-office-writing/​paper/​promotional-calendars-diaries/​
 +  LiteMage [cron:​user1:​1559124843] ​      [4] => https://​www.example.com/​business-office-writing/​desk/​promotional-calculators/​
 +  LiteMage [cron:​user1:​1559124843] ​      [5] => https://​www.example.com/​business-office-writing/​paper/​promotional-notebooks/​
 +  LiteMage [cron:​user1:​1559124843] ​  )
 +  LiteMage [cron:​user1:​1559124843]
 +  2019-05-29T10:​14:​32+00:​00 DEBUG (7): LiteMage [cron:​user1:​1559124843] ​ litemage_runner crawling ​ store1 urls (cur_pos:6) with cookie ​
 +  litemage_cron=store1;​ Array
 +  LiteMage [cron:​user1:​1559124843] ​  (
 +  LiteMage [cron:​user1:​1559124843] ​      [0] => https://​www.example.com/​bags-and-travel/​
 +  LiteMage [cron:​user1:​1559124843] ​      [1] => https://​www.example.com/​clothing-accessories/​
 +  LiteMage [cron:​user1:​1559124843] ​      [2] => https://​www.example.com/​usb-technology/​
 +  LiteMage [cron:​user1:​1559124843] ​      [3] => https://​www.example.com/​food-and-drink/​
 +  LiteMage [cron:​user1:​1559124843] ​      [4] => https://​www.example.com/​health-personal-care/​
 +  LiteMage [cron:​user1:​1559124843] ​      [5] => https://​www.example.com/​bags-and-travel/​travel/​backpacks/​
 +  LiteMage [cron:​user1:​1559124843] ​  )
 +
 +It means the warmup started to run. 
 +
 +But ''​Run now''​ action won't fix the Magento system scheduler problem and the initiated cron will be stopped due to exceeding defined Maximum Run Time in the configuration. ​
 +
 +{{ :​litespeed_wiki:​cache:​litemage:​troubleshooting:​781630-9-litespeed-warmup-stats-stopped-exceeding-defined-max-run-time.png?​800 |}}
 +
 +litemage_crawler.log shows:
 +  2019-06-19T16:​17:​05+00:​00 DEBUG (7): LiteMage [cron:​brandin1:​1560960721] ​ Stopped due to exceeding defined Maximum Run Time. cron meta end = Array
 +
 +it is normal since the user set the cron to stop at 5 minutes then it runs again at next scheduled time. If it stopped there completely without further running, there is some Magento system scheduler issue which needs to be fixed.
 +
 +By further checking user1'​s crontab:
 +  crontab -u user1 -e
 +  ​
 +  MAILTO=""​
 +  SHELL="/​usr/​local/​cpanel/​bin/​jailshell"​
 +  * * * * * /​usr/​local/​bin/​php /​home/​user1/​public_html/​cron.php
 +  SHELL="/​usr/​local/​cpanel/​bin/​jailshell"​
 +  * * * * * /​usr/​local/​bin/​php /​home/​user1/​public_html/​cron.sh
 +  SHELL="/​usr/​local/​cpanel/​bin/​jailshell"​
 +  * * * * * /bin/bash /​home/​user1/​public_html/​scheduler_cron.sh --mode always
 +  SHELL="/​usr/​local/​cpanel/​bin/​jailshell"​
 +  * * * * * /bin/bash /​home/​user1/​public_html/​scheduler_cron.sh --mode default
 +  SHELL="/​usr/​local/​cpanel/​bin/​jailshell"​
 +  * * * * * /bin/bash /​home/​user1/​public_html/​cron.sh
 +  SHELL="/​usr/​local/​cpanel/​bin/​jailshell"​
 +  * * * * * /bin/sh /​home/​user1/​public_html/​cron.sh
 +  * * * * * /bin/sh /​home/​user1/​public_html/​cron.sh cron.php
 +
 +(note: you may need ''​SHELL="/​usr/​local/​cpanel/​bin/​jailshell"''​ on cpanel for jailshell)
 +
 +Too many same crones setup, which may conflict with each other.
 +
 +Latest 1.9.x.x version of Magento may prefer to run ''/​home/​user1/​public_html/​scheduler_cron.sh''​ instead of ''/​home/​user1/​public_html/​cron.sh''​. You can find it from Magento Admin -> System -> Scheduler -> Insctuctions:​
 +
 +  Run scheduler_cron.sh instead cron.sh (recommended)
 +  Run every minute (recommended)
 +  Edit your crontab:
 +  sudo crontab -u user1 -e
 +  Add following configuration:​
 +  * * * * * /bin/bash /​home/​user1/​public_html/​scheduler_cron.sh --mode always
 +  * * * * * /bin/bash /​home/​user1/​public_html/​scheduler_cron.sh --mode default
 + 
 +{{ :​litespeed_wiki:​cache:​litemage:​troubleshooting:​781630-7-scheduler-instruction2.png?​600 |
 +}}
 +
 +Remove all duplicated one and only keep the above two configurations. The issue is fixed and litemage_crawler.log shows ok now.
 +''​litemage_warmup_cache''​ cron task will show running in Scheduler and LiteMage Crawler Warm-up Status will show running ok.
 +
 +{{ :​litespeed_wiki:​cache:​litemage:​troubleshooting:​781630-9-scheduler-litemage_warmup_cache_running.png?​800 |}}
 +
 +{{ :​litespeed_wiki:​cache:​litemage:​troubleshooting:​781630-9-litespeed-warmup-stats-running.png?​800 |}}
 ===== Warm Up for logged in users ===== ===== Warm Up for logged in users =====
 Normally logged in users and non-logged in users will share the same cache copies. However, when you enable **Separate Cache Copy per Customer Group** in LiteMage configuration,​ LiteMage will have different cache copies. ​ Normally logged in users and non-logged in users will share the same cache copies. However, when you enable **Separate Cache Copy per Customer Group** in LiteMage configuration,​ LiteMage will have different cache copies. ​
Line 331: Line 422:
 {{ :​litespeed_wiki:​cache:​litemage:​troubleshooting:​litemage-logged-in-user-warm-up-onbehalfofloggedinuser.png?​600 |}} {{ :​litespeed_wiki:​cache:​litemage:​troubleshooting:​litemage-logged-in-user-warm-up-onbehalfofloggedinuser.png?​600 |}}
  
-Save the configuration ​and refresh ​**Configuration** from Magento Admin **Cache Management** to make it effective. +**Save the configuration** ​will make the change ​effective. ​ 
-{{ :​litespeed_wiki:​cache:​litemage:​troubleshooting:​litemage-logged-in-user-warm-up-configuration-refresh.png?​600 |}}+
 ===== LiteMage Cache Warm Up configuration Reference ===== ===== LiteMage Cache Warm Up configuration Reference =====
 Please refer [[ litespeed_wiki:​cache:​litemage:​configuration:​cache_warm_up|this]] for LiteMage Cache Warm Up configuration Reference Please refer [[ litespeed_wiki:​cache:​litemage:​configuration:​cache_warm_up|this]] for LiteMage Cache Warm Up configuration Reference
  • Admin
  • Last modified: 2019/06/25 19:54
  • by Jackson Zhang