high load on API post submissions cause SQL IntegrityError on job creation

Bug #1885578 reported by Laura
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake Engine
New
Undecided
Unassigned

Bug Description

making many job requests of openquake within a very short period of time, frequently this error occurs with the following details:
File "/home/myuser/work/3rd/oq-engine/openquake/server/db/actions.py", line 105, in create_job', ' job.keys(), job.values()).lastrowid', ' File "/home/sarsonl/work/3rd/oq-engine/openquake/server/dbapi.py", line 335, in __call__', " raise exc.__class__('%s: %s %s' % (exc, templ, args))", "IntegrityError: UNIQUE constraint failed: job.id: INSERT INTO job (id, is_running, description, user_name, calculation_mode, ds_calc_dir) VALUES (?, ?, ?, ?, ?, ?) (51, 1, 'just created', 'myuser', 'to be set', '/home/myuser/oqdata/calc_51')"

I believe that the job creation is not thread safe. I was running a workflow that made 40 requests to the engine within a few seconds timespan.

Is this use-case one which is catered for in openquake, or is it outside the scope?

Thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.