I have this error and really don't understand why it happens,
我有这个错误,真的不明白为什么会这样,
I am running a few scripts every 10 minutes, they do a few things on the same dataset in BigQuery, the scripts basically are comparing rows of some tables and extracting/putting some data on them, they use "bq show" "bq query with --replace to a table in the dataset" and "bq extract" for some reason some times I am getting a "database locked" error , however I don't think any of the things I am running would block the DB, it's only.
我运行几个脚本每10分钟,他们所做的一些事情在同一数据集在BigQuery,一些表的脚本基本上是比较行和提取/把一些数据,他们使用“bq秀”“bq查询——替换一个表的数据集”和“bq提取”由于某种原因有时我得到一个“数据库锁定”的错误,但是我不认为任何事情我将阻止运行DB,只有。
the error is this one:
错误是这样的:
Traceback (most recent call last):
File "/usr/lib64/google-cloud-sdk/bin/bootstrapping/bq.py", line 79, in <module>
exceptions.HandleError(e, 'bq')
File "/usr/lib64/google-cloud-sdk/bin/bootstrapping/bq.py", line 75, in <module>
bootstrapping.CheckCredOrExit()
File "/usr/lib64/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 110, in CheckCredOrExit
c_store.Load()
File "/usr/lib64/google-cloud-sdk/lib/googlecloudsdk/core/credentials/store.py", line 358, in Load
Refresh(cred)
File "/usr/lib64/google-cloud-sdk/lib/googlecloudsdk/core/credentials/store.py", line 377, in Refresh
credentials.refresh(http_client or http.Http())
File "/usr/lib64/google-cloud-sdk/lib/third_party/oauth2client/client.py", line 571, in refresh
self._refresh(http.request)
File "/usr/lib64/google-cloud-sdk/lib/third_party/oauth2client/client.py", line 793, in _refresh
self._do_refresh_request(http_request)
File "/usr/lib64/google-cloud-sdk/lib/third_party/oauth2client/client.py", line 837, in _do_refresh_request
self.store.locked_put(self)
File "/usr/lib64/google-cloud-sdk/lib/googlecloudsdk/core/credentials/creds.py", line 227, in locked_put
getattr(self._credentials, 'rapt_token', None))
File "/usr/lib64/google-cloud-sdk/lib/googlecloudsdk/core/credentials/creds.py", line 181, in Store
(account_id, access_token, token_expiry, rapt_token))
File "/usr/lib64/google-cloud-sdk/lib/googlecloudsdk/core/credentials/creds.py", line 167, in _Execute
cur.Execute(*args)
File "/usr/lib64/google-cloud-sdk/lib/googlecloudsdk/core/credentials/creds.py", line 106, in Execute
return self._cursor.execute(*args)
sqlite3.OperationalError: database is locked
Any ideas ??
有什么想法?
1 个解决方案
#1
2
It is likely that another process is using the credentials.db file. The credentials.db file exists in your user config directory which you can find by running gcloud info.
很可能另一个进程正在使用凭据。db文件。的凭证。db文件存在于您的用户配置目录中,您可以通过运行gcloud info找到它。
On linux you can see what process is using a file with the
在linux上,您可以看到使用文件的进程是什么
fuser 'FILE' command.
fuser命令“文件”。
#1
2
It is likely that another process is using the credentials.db file. The credentials.db file exists in your user config directory which you can find by running gcloud info.
很可能另一个进程正在使用凭据。db文件。的凭证。db文件存在于您的用户配置目录中,您可以通过运行gcloud info找到它。
On linux you can see what process is using a file with the
在linux上,您可以看到使用文件的进程是什么
fuser 'FILE' command.
fuser命令“文件”。