You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally reported by: Jason R. Coombs (Bitbucket: jaraco, GitHub: jaraco)
Using the cli to dispatch 6 swarms, I encountered this error.
Traceback (most recent call last):
File "/app/.heroku/venv/lib/python2.7/site-packages/vr/server/tasks.py", line 72, in wrapper
func(*args, **kwargs)
File "/app/.heroku/venv/lib/python2.7/site-packages/vr/server/tasks.py", line 511, in swarm_release
pl.save()
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/models/base.py", line 734, in save
force_update=force_update, update_fields=update_fields)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/models/base.py", line 762, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/models/base.py", line 846, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/models/base.py", line 885, in _do_insert
using=using, raw=raw)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/models/manager.py", line 127, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/models/query.py", line 920, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 974, in execute_sql
cursor.execute(sql, params)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/utils.py", line 98, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
IntegrityError: duplicate key value violates unique constraint "deployment_portlock_host_id_3a973353e3b27e11_uniq"
DETAIL: Key (host_id, port)=(124, 5006) already exists.
It's not clear to me what would trigger this error. Here's what the event log looked like.
Original comment byBrent Tubbs (Bitbucket: btubbs, GitHub: btubbs):
It's a race condition between two swarming operations. Both are trying to grab the same host+port for one of their procs. The IntegrityError is saying "sorry, the database forbids that", and saving you from the much worse problem of two procs trying to use the same port on the same host.
You could catch it at the level that decides which port to use and have it try a different one.
Originally reported by: Jason R. Coombs (Bitbucket: jaraco, GitHub: jaraco)
Using the cli to dispatch 6 swarms, I encountered this error.
It's not clear to me what would trigger this error. Here's what the event log looked like.
The text was updated successfully, but these errors were encountered: