[gridengine users] [SGE+sqlite3] Error: database is locked
reuti at staff.uni-marburg.de
Thu Nov 22 18:01:29 UTC 2012
Am 22.11.2012 um 17:24 schrieb Pierre Lindenbaum:
> I'm trying to run a script that fills a sqlite3 database.
> The script creates a lock with `lockfile` , fills the database and releases the lock.
> $cat test.sh
> lockfile /commun/data/_tmp.idp448.lock
> sqlite3 /commun/data/stats.sqlite "create table if not exists timeBeginDB(target text UNIQUE NOT NULL,inserted int);"
> rm -f /commun/data/_tmp.idp448.lock
Is "/commun/" shared between all nodes?
> without qsub the script works without any problem :
> [lindenb]$ sh test.sh
> when qsub is invoked:
> $ qsub -cwd -S /bin/sh test.sh
> Your job 673 ("test.sh") has been submitted
> $ cat test.sh.o673
> $ cat test.sh.e673
> Error: database is locked
> which is a sqlite3 error.
> Do you have any idea, suggestion of what, on the SGE side, could be the cause of that problem, this difference of behavior ?
Is the lockfile you define "_tmp.idp448.lock" in any way related to the database? Maybe the output is not telling the truth.
On the command line it runs local, but if it's submitted on any machine in the cluster. Also the environment might miss some settings which are present on the command line.
More information about the users