Showing results for 
Search instead for 
Did you mean: 

Script to Restart loader


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.



Hi @Incortaconsulta ,

You can run the following stop and start commands:

Location:  <Incorta_installation_path>/IncortaNode/

./ loaderService

./ loaderService


Hi Bryan - can it be automated with cronjob? usually, I do kill the currently running process id and then start the services.


Hi Ram,

You can use following , 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

#!/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
./ loaderService
# - sleep will sleep the execution of next for 2 minutes ,if you # # - want remove # against it

# sleep 120
./ loaderService
# end of scirpt

chmod 755

You can test this script by

cd /u01/incorta/IncortaAnalytics/IncortaNode/
sh -x

crontab entry ( it will start it at 7:30 AM every Sunday)

30 7 * * sun /u01/incorta/IncortaAnalytics/IncortaNode/

This is basic shell script , you can add more features if you want.



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/ loaderService

<path to IncortaAnalytics>/IncortaNode/ 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.