Idea to prevent long queries from GUI/API
1) create Linux accounts for ncis_gui and ncis_api
2) use these accounts to own the WSGI processes (rather than account ncis)
3) In postgres account, run a cron job to look for
long connections for these accounts and kill the backend if found.