Hi Guys,
I have aem publish running on aws ec2 instance. There is a monit script to start and stop the aem service.
It was working all good. However once due to heavy load on the publish instance the aem service failed to start when new ec2 instance spun up as part of autoscaling.
Looking forward for you suggestions.
----------
check process aem with pidfile /srv/sfw/aem/crx-quickstart/conf/cq.pid
start program = "/sbin/service aem start"
stop program = "/sbin/service aem stop"
if failed port 8080 then restart
-----------
The aem script
--------------------
CQ5_ROOT=/< >
CQ5_USER=< >
########
SERVER=${ }/crx-quickstart
START=${SERVER}/bin/start
STOP=${SERVER}/bin/stop
STATUS="${SERVER}/bin/status"
case "$1" in
start)
echo -n "Starting aem services: "
su - ${CQ5_USER} ${START}
touch /var/lock/subsys/aem
;;
stop)
echo -n "Shutting down aem services: "
su - ${CQ5_USER} ${STOP}
sleep 20
rm -f /var/lock/subsys/aem
;;
status)
su - ${CQ5_USER} ${STATUS}
;;
restart)
su - ${CQ5_USER} ${STOP}
su - ${CQ5_USER} ${START}
;;
reload)
;;
*)
echo "Usage: aem {start|stop|status|reload}"
exit 1
;;
esac
Views
Replies
Total Likes