[Mayan EDMS: 1993] Cannot Rebuild Indexes manually (MultipleObjectsReturned)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 1993] Cannot Rebuild Indexes manually (MultipleObjectsReturned)

Gerrit Van Dyk
Hi,

When trying to rebuild all indexes, I get the following error.

Exception Type: MultipleObjectsReturned, Exception Value:get() returned more than one Lock -- it returned 15!

It seems that this error is coming from lock_manager/managers.py in check_existing on line 55. 
existing_lock = self.get(**kwargs)

How can I clear these errors, or get rid of the multiple locks.

Gerrit



--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2000] Re: Cannot Rebuild Indexes manually (MultipleObjectsReturned)

rosarior
Administrator
"get() returned more than one Lock -- it returned 15!" <- That should not be happening. 

Can you share the index template you used that triggers this or a simplified version with no private information?

The locks should be releasing even on errors (https://gitlab.com/mayan-edms/mayan-edms/blob/master/mayan/apps/document_indexing/models.py#L271).

What line number is the .get() error happening?

In the worst case, lock have a default timeout of 30 seconds (https://gitlab.com/mayan-edms/mayan-edms/blob/master/mayan/apps/lock_manager/settings.py#L19)

While the cause of the issue in found and fixed you can force a release of all lock with the management command (command line):

./manage.py purgelocks

To achieve the same from code (from Python) use:

from lock_manager.runtime import locking_backend
locking_backend.purge_locks()


On Thursday, August 10, 2017 at 10:18:02 AM UTC-4, Gerrit Van Dyk wrote:
Hi,

When trying to rebuild all indexes, I get the following error.

Exception Type: MultipleObjectsReturned, Exception Value:get() returned more than one Lock -- it returned 15!

It seems that this error is coming from lock_manager/managers.py in check_existing on line 55. 
existing_lock = self.get(**kwargs)

How can I clear these errors, or get rid of the multiple locks.

Gerrit



--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2004] Re: Cannot Rebuild Indexes manually (MultipleObjectsReturned)

Gerrit Van Dyk
The line number is from lock_manager/managers.py in check_existing on line 55.

I am running this from the normal Rebuild Indexes on the Tools menu.

On Friday, August 11, 2017 at 3:52:25 AM UTC+2, Roberto Rosario wrote:
"get() returned more than one Lock -- it returned 15!" <- That should not be happening. 

Can you share the index template you used that triggers this or a simplified version with no private information?

The locks should be releasing even on errors (<a href="https://gitlab.com/mayan-edms/mayan-edms/blob/master/mayan/apps/document_indexing/models.py#L271" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgitlab.com%2Fmayan-edms%2Fmayan-edms%2Fblob%2Fmaster%2Fmayan%2Fapps%2Fdocument_indexing%2Fmodels.py%23L271\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdIDT_aM5PO4IGlWSC7IhoeRpnow&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgitlab.com%2Fmayan-edms%2Fmayan-edms%2Fblob%2Fmaster%2Fmayan%2Fapps%2Fdocument_indexing%2Fmodels.py%23L271\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdIDT_aM5PO4IGlWSC7IhoeRpnow&#39;;return true;">https://gitlab.com/mayan-edms/mayan-edms/blob/master/mayan/apps/document_indexing/models.py#L271).

What line number is the .get() error happening?

In the worst case, lock have a default timeout of 30 seconds (<a href="https://gitlab.com/mayan-edms/mayan-edms/blob/master/mayan/apps/lock_manager/settings.py#L19" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgitlab.com%2Fmayan-edms%2Fmayan-edms%2Fblob%2Fmaster%2Fmayan%2Fapps%2Flock_manager%2Fsettings.py%23L19\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlR0JrxJ4rqJG4aNVOBgTxKFpFeA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgitlab.com%2Fmayan-edms%2Fmayan-edms%2Fblob%2Fmaster%2Fmayan%2Fapps%2Flock_manager%2Fsettings.py%23L19\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlR0JrxJ4rqJG4aNVOBgTxKFpFeA&#39;;return true;">https://gitlab.com/mayan-edms/mayan-edms/blob/master/mayan/apps/lock_manager/settings.py#L19)

While the cause of the issue in found and fixed you can force a release of all lock with the management command (command line):

./manage.py purgelocks

To achieve the same from code (from Python) use:

from lock_manager.runtime import locking_backend
locking_backend.purge_locks()


On Thursday, August 10, 2017 at 10:18:02 AM UTC-4, Gerrit Van Dyk wrote:
Hi,

When trying to rebuild all indexes, I get the following error.

Exception Type: MultipleObjectsReturned, Exception Value:get() returned more than one Lock -- it returned 15!

It seems that this error is coming from lock_manager/managers.py in check_existing on line 55. 
existing_lock = self.get(**kwargs)

How can I clear these errors, or get rid of the multiple locks.

Gerrit



--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2008] Re: Cannot Rebuild Indexes manually (MultipleObjectsReturned)

rosarior
Administrator
Ah yes! Didn't saw it, thanks!

On Friday, August 11, 2017 at 2:30:44 AM UTC-4, Gerrit Van Dyk wrote:
The line number is from lock_manager/managers.py in check_existing on line 55.

I am running this from the normal Rebuild Indexes on the Tools menu.

On Friday, August 11, 2017 at 3:52:25 AM UTC+2, Roberto Rosario wrote:
"get() returned more than one Lock -- it returned 15!" <- That should not be happening. 

Can you share the index template you used that triggers this or a simplified version with no private information?

The locks should be releasing even on errors (<a href="https://gitlab.com/mayan-edms/mayan-edms/blob/master/mayan/apps/document_indexing/models.py#L271" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgitlab.com%2Fmayan-edms%2Fmayan-edms%2Fblob%2Fmaster%2Fmayan%2Fapps%2Fdocument_indexing%2Fmodels.py%23L271\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdIDT_aM5PO4IGlWSC7IhoeRpnow&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgitlab.com%2Fmayan-edms%2Fmayan-edms%2Fblob%2Fmaster%2Fmayan%2Fapps%2Fdocument_indexing%2Fmodels.py%23L271\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdIDT_aM5PO4IGlWSC7IhoeRpnow&#39;;return true;">https://gitlab.com/mayan-edms/mayan-edms/blob/master/mayan/apps/document_indexing/models.py#L271).

What line number is the .get() error happening?

In the worst case, lock have a default timeout of 30 seconds (<a href="https://gitlab.com/mayan-edms/mayan-edms/blob/master/mayan/apps/lock_manager/settings.py#L19" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgitlab.com%2Fmayan-edms%2Fmayan-edms%2Fblob%2Fmaster%2Fmayan%2Fapps%2Flock_manager%2Fsettings.py%23L19\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlR0JrxJ4rqJG4aNVOBgTxKFpFeA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgitlab.com%2Fmayan-edms%2Fmayan-edms%2Fblob%2Fmaster%2Fmayan%2Fapps%2Flock_manager%2Fsettings.py%23L19\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHlR0JrxJ4rqJG4aNVOBgTxKFpFeA&#39;;return true;">https://gitlab.com/mayan-edms/mayan-edms/blob/master/mayan/apps/lock_manager/settings.py#L19)

While the cause of the issue in found and fixed you can force a release of all lock with the management command (command line):

./manage.py purgelocks

To achieve the same from code (from Python) use:

from lock_manager.runtime import locking_backend
locking_backend.purge_locks()


On Thursday, August 10, 2017 at 10:18:02 AM UTC-4, Gerrit Van Dyk wrote:
Hi,

When trying to rebuild all indexes, I get the following error.

Exception Type: MultipleObjectsReturned, Exception Value:get() returned more than one Lock -- it returned 15!

It seems that this error is coming from lock_manager/managers.py in check_existing on line 55. 
existing_lock = self.get(**kwargs)

How can I clear these errors, or get rid of the multiple locks.

Gerrit



--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.