Right now I get a blank page when localhost runs, but the deployed app is fine. The logs show the "database is locked". How do I "unlock" the database for localhost?
This can happen if you're running multiple instances of dev_appserver without giving them distinct datastore files/directories. If you need to be running multiple instances, see dev_appserver.py --help
and look at the options for specifying paths/files.
dev_appserver
from the command line in multiple shell windows. Sorry, but have very little experience with the launcher, being an old-school command-line kind of developer. –
Absorbed app.yaml
. (.
is fine if you're already there.) –
Absorbed Dave W. Smith has the right idea. I had this same issue and looking into the docs you need to set the --storage_path='some/path'
to be different for each instance of the localhost.
From the Docs:
--storage_path PATH path to the data (datastore, blobstore, etc.)
Also, different port and admin_ports
have to be set to run the two instances.
dev_appserver.py ./ --port=<unique port number> --admin_port=<unique port number> --storage_path=<unique path>
e.g. dev_appserver.py ./ --port=8001 --admin_port=8002 --storage_path=var/api
. Using var/api
will create this path in your app's file structure. –
Penutian I tried this and it worked, I noticed that when this happens, there are multiple pythonw.exe processes working in the process bar.
Go to command prompt, run the following
taskkill /f /im pythonw.exe
Restart your application from the app launcher
python.exe
for me, and I had to open in Administrator mode. –
Selfmoving So with your command to start the server which should be
start_in_shell.sh -f -p 8xxx -a 8xxx
do include a -s
flag after the -f
as below:
start_in_shell.sh -f -s -p 8xxx -a 8xxx
Sometimes some unanticipated error somewhere causes this issue. Remember to keep only one of the instances with this flag(-s
) and others should be started as you do usually.
This should make it work.
© 2022 - 2024 — McMap. All rights reserved.