Summary
If the above error appears in the prspi.log located in the /var/opt/OV/NNMPerformanceSPI/logs directory , usaully when attempting database related operations it means that SYSTEM V sempahores have been exhausted.
Error
Insufficient system resources - failed to allocate a SYSV semaphore.
Cause
This issue might happen because many processes have been killed without closing sempahores. This is what happens when "kill -9" is used. That situation is avoided by the NPS start and stop scripts but it cannot be prevented since the kill command is always available (hopefully as a last resort).