I am using WSGI, apache2 and flask to serve an API. The script works fine the first time I run it but then the second time it throws a [login to view URL]: unable to open database file. I then have to restart the server to make it work. I assume it is a permissions or disk space error. Need it fixed.