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

拥有回忆 提交于 2019-12-21 04:26:12

问题


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?


回答1:


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.




回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/20578757/how-do-i-unlock-the-app-engine-database-when-localhost-runs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!