-
Notifications
You must be signed in to change notification settings - Fork 2
Troubleshooting
The most promising starting point for troubleshooting is the application log. Depending on the concrete setting, in which the app is run, logs will be stored in different places. When running with pm2 [1], the logging will be handled by the production manager and therefore stored in the hidden .pm2/logs
folder.
For each app, two log files with different suffixes are created, (1) -out-
and (2) -error-
. Logs are named according to the app name, e.g. loc-db-demo-error-0.log
. Another option to access the logs is to run pm2 logs
, which will stream the application logs in real time.
In case the search index is out of sync with the database, it is typically enough to delete the index and restart the app. Upon restart, the index will be recreated and synced from scratch with database:
curl -XDELETE localhost:9200/"$INDEX"
pm2 restart "$APP1"
pm2 restart "$APP2"
With $INDEX being the name of the index and $APP1 and $APP2 being the names of the two apps which are created upon deployment, e.g.,
INDEX="locdb-demo_br"
APP1="loc-db-demo"
APP2="loc-db-jobs-demo"