cytomine/Cytomine-bootstrap

Fetch all annotation by tag id gives 404 (Resource not found)

Ceachi opened this issue · 1 comments

Describe the bug
I want to fetch all annotations inside the project, filtered by a tag.
I'm using the following call in cytomine python:


ann = AnnotationCollection(project=project_id, tags=[tag_id]).fetch()

Luckly, 3 days ago, everything worked fine.

Now, I can only fetch based on 2 tags id(tag_a, tag_b) the third one(tag_c) gives boolean False (404 resource not found)

The tag_c id is correct because:

If I fetch all annotations with " AnnotationCollection(project=project_id).fetch()" and exclude the ones with tag_a, tag_b, and take one annotation from this filtered list with "TagDomainAssociationCollection(annotation).fetch()" gives name of tag_c instance and id.

So, I know the resource exists, and I know tag_c id, but I can't call AnnotationCollection(project=project_id, tags=[tag_c_id]).

I want to mention that I did not made any changes in any configuration files. Also, if i go in cytomine interface, and filter my annotations based on a tag, give the following error: "Failed to fetch annotations". But all annotation have tag_c.

After looking throw logs, there was this error message: ERROR: could not resize shared memory segment "/PostgreSQL.1525015377" to 8388608 bytes: No space left on device.

So i increased the space for PostgreSQL and the problem was solved.
Here are the links with this issue:
https://stackoverflow.com/questions/56751565/pq-could-not-resize-shared-memory-segment-no-space-left-on-device
https://stackoverflow.com/questions/55803015/google-cloud-sql-pg11-could-not-resize-shared-memory-segment

I also had to do:
max_parallel_workers_per_gather = 0

Problem solved.

This solution is correct if you face the following error in the Annotation tab from the interface: "Failed to fetch annotations".