oPromessa/flickr-uploader

V2.5.9 OperationalError: database is locked; in Multiprocessing; line 1624

Closed this issue · 2 comments

From the logs a lock operation failed!!!

[2017.11.06 08:45:44]:[Process-40][WARNING ]:[root] Exiting useDBLock with useDBoperation:[False]. Result:[True]
[2017.11.06 08:45:50]:[Process-34][WARNING ]:[root] Uploading/Reuploading [0/10 attempts].
Process Process-40:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "./uploadr.py", line 1141, in uploadFileX
[2017.11.06 08:46:00]:[Process-54][WARNING ]:[root] ===Multiprocessing=== out.lock.release
[2017.11.06 08:46:00]:[Process-54][WARNING ]:[root] Exiting useDBLock with useDBoperation:[False]. Result:[True]
[2017.11.06 08:46:00]:[Process-30][WARNING ]:[root] ===Multiprocessing=== out.lock.acquire
[2017.11.06 08:46:00]:[Process-30][WARNING ]:[root] Exiting useDBLock with useDBoperation:[True]. Result:[True]
[2017.11.06 08:46:01]:[Process-54][WARNING ]:[root] title_name:[IMG_8556] 
[2017.11.06 08:46:01]:[Process-54][WARNING ]:[root] Uploading/Reuploading [0/10 attempts].
    self.uploadFile(lock, f)
  File "./uploadr.py", line 1624, in uploadFile
    logging.debug('===Multiprocessing==='
OperationalError: database is locked

V2.6.0 still occurs... under:

[2017.11.17 23:43:44]:[Process-55][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.17 23:43:49]:[Process-58][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.17 23:58:18]:[Process-55][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.17 23:58:23]:[Process-41][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.17 23:58:48]:[Process-46][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.17 23:58:53]:[Process-41][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.18 00:00:43]:[Process-41][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.18 00:00:49]:[Process-31][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.18 01:39:47]:[Process-59][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.18 01:40:25]:[Process-59][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.18 01:40:30]:[Process-26][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.18 01:40:35]:[Process-40][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.18 01:40:40]:[Process-17][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.18 01:40:45]:[Process-24][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.18 01:40:50]:[Process-37][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.18 01:40:55]:[Process-27][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]
[2017.11.18 01:41:00]:[Process-60][ERROR   ]:[root] +++ DB#030: DB error occurred: [database is locked]

It seems to occur in tuples (pairs, triples...)... even with lock control sometimes the actual database access gets an DB locked error...

Solved on 1b5d0b7 by performing up to MAX_SQL_ATTEMPTS (new parameter on uploadr.ini)