Restarting Portfolio’s Services

Standard
Portfolio Admin

As mentioned in my previous post, we’re currently cataloging around 40TB of data in Portfolio.

However, again as per the previous post, we’ve found some files to be troublesome causing issues cataloging. Once Portfolio attempts to catalog these files, the processes used can hang & get stuck on those files.

Portfolio then spawns more & more processes for the next files it finds until the box running Portfolio eventually runs out of resources.

To maintain the hosts uptime, we’re using the below script to restart the services daily.

Example

Screen Shot 2016-01-08 at 9.16.08 PM

Our Portfolio server is hosted on a Mac Pro (Late 2013) 6-Core Intel Xeon E5 with 64GB RAM & the above shows Portfolio using all the CPU, the RAM usage looks similar.

By correcting troublesome files, the overhead is reduced post restarting the services as Portfolio as it doesn’t trip up over the files again. But once it encounters more troublesome files, the usage soars like the above.

Portfolio Administration

Screenshot 2016-01-15 22.27.57

Sadly, whilst Portfolio has a restart option within the Portfolio Administration web page. It will not clear all the services spawned by Portfolios processes.

The Script

So, with the above in mind & not being able to restart the whole server in hours I wrote the below script.

As there are a few LaunchDaemons & spawned processes, I’ve found the sleep commands to help. Also, I’ve split the script up to show you how to not only restart the services, but to stop them then start them at a later time.

For info, we run the restart script at 1am daily.

Restart Portfolio

Stop Portfolio

Start Portfolio

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.