12-22-2022 09:24 PM
Hi All - Wondering, whether we can have an automated shell script to restart the loader box like every week which will help to clear my loader memory.
we have a small non-prod instance, and before every full load on my schemas, I need to restart the loader to make sure not to get an "out of memory" error. I need some solutions to overcome this manual activity.
12-28-2022 07:05 PM
Hi @Incortaconsulta ,
You can run the following stop and start commands:
Location: <Incorta_installation_path>/IncortaNode/
./stopService.sh loaderService
./startService.sh loaderService
01-02-2023 01:54 PM
Hi Bryan - can it be automated with cronjob? usually, I do kill the currently running process id and then start the services.
01-02-2023 09:38 PM
Hi Ram,
You can use following stopstartLoader.sh , please test it first on your test cluster. If you have two nodes you will need to add it two other node also if you have Loader service on second node also.
> vi stopstartLoader.sh
#!/usr/bin/env bash
# **********************************************************************************************
# start/stop Loader Service Script through crontab
# - Change the location of your script below according to your location
#***********************************************************************************************
cd /u01/incorta/IncortaAnalytics/IncortaNode/
# pwd
./stopService.sh loaderService
# - sleep will sleep the execution of next startService.sh for 2 minutes ,if you # # - want remove # against it
# sleep 120
./startService.sh loaderService
exit;
# end of scirpt
vi stopstartLoader.sh
chmod 755 stopstartLoader.sh
You can test this script by
cd /u01/incorta/IncortaAnalytics/IncortaNode/
sh -x stopstartLoader.sh
crontab entry ( it will start it at 7:30 AM every Sunday)
30 7 * * sun /u01/incorta/IncortaAnalytics/IncortaNode/stopstartLoader.sh
This is basic shell script , you can add more features if you want.
02-01-2023 11:20 AM
You may write a bash shell script to execute the commands necessary to stop and start the services.
Then you could create a cron job to schedule this script to be run at the frequency that you choose.
The commands would be something like:
<path to IncortaAnalytics>/IncortaNode/stopService.sh loaderService
<path to IncortaAnalytics>/IncortaNode/startService.sh loaderService
Note: you would want to pick a time to do this when there are not loader jobs running as a best practice.
If you are not sure of the service name you can run the command "cat <path to IncortaAnalytics>/IncortaNode/services/services.index" and read the name for loader in the output.
You may want to implement a scripting technique to wait for a minute between commands. Something like "sleep 60" between the 2 commands would pause the bash script for 1 minute before executing the second command. You can easily find examples on the Internet.