mango
mango

Reputation: 553

How do I unlock the app engine database when localhost runs?

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?

Upvotes: 7

Views: 3478

Answers (4)

Apurva Kunkulol
Apurva Kunkulol

Reputation: 441

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.

Upvotes: 0

Paul Bendevis
Paul Bendevis

Reputation: 2621

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.

Upvotes: 9

user3551911
user3551911

Reputation: 31

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

Upvotes: 2

Dave W. Smith
Dave W. Smith

Reputation: 24966

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.

Upvotes: 9

Related Questions