Skip to content

Instantly share code, notes, and snippets.

@kennethgillen
Last active April 6, 2018 15:44
Show Gist options
  • Save kennethgillen/bcf02d2ff5bfa7e4dd9a150bea62731a to your computer and use it in GitHub Desktop.
Save kennethgillen/bcf02d2ff5bfa7e4dd9a150bea62731a to your computer and use it in GitHub Desktop.
If OMERO PixelData process is choking on a set of uploaded files, set a shell to restart it to allow the batch to be overcome.
tail -fn0 /opt/omero/server/OMERO.server/var/log/PixelData-0.log | \
while read line ; do
echo "$line" | grep "ome.conditions.InternalException: Wrapped Exception: (java.lang.OutOfMemoryError)"
if [ $? = 0 ]
then
sudo -u omero-server /opt/omero/server/OMERO.server/bin/omero admin ice "server stop PixelData-0" && echo $(date) restarted PixelData process | tee ~/command_log.txt
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment