Unable to delete questionnaire

We use a Sandbox workspace to test our questionnaire and pre-load data and delete the questionnaire once we are done testing.

We have a questionnaire with about 1,00,000 pre-loaded assignments in the sandbox workspace. I have deleted the questionnaire and it has simply greyed out, followed by all the other versions of the this questionnaires. It has been this way for about 3 hours. The assignments are also no longer editable. When trying to re-assign the assignments, nothing happens. The Assign button is clickable but doesn’t work. Same with closing or archiving them.

Trying to edit the assignments via API (susoapi package in R) also gives an error (Unable to update assignee for assignment. Reason: Unkown error. HTTP code: 500.).

I think the process for deleting the questionnaire (which should also delete the assignments) isn’t moving. How can I fix this?

@ashwinikalantri , check the server logs for any errors after the moment you confirmed you want to delete the survey.

@sergiy, these are the logs around the time I tried to remove the questionnaire. We didn’t upgrade assignments for ver 15, and it was deleted successfully. Ver 14 has ~1,00,000 assignments and couldn’t be deleted along with versions (13 - 11) below it.

@sergiy did the logs help? How do we completely remove the questionnaire and the assignments?

Hello @ashwinikalantri ,

yes, the logs have helped. They indicated that deletion of the questionnaire has not succeeded completely within a fixed allocated time period for this operation (timed out).

The route we took is to allocate considerably more time for this operation, so that this can succeed on slower machines and with more data: Questionnaire deletion did not succeed · Issue #2260 · surveysolutions/surveysolutions · GitHub

Afaik this version hasn’t been released yet.

Best, Sergiy

Great! Will wait for the release.

Hello @ashwinikalantri , after the update to the new version, click the questionnaire again and re-try deletion from the menu. Best, Sergiy

@sergiy, we updated to 22.12.2 today and tried to delete the questionnaires. We were able to delete versions 11 through 13, the version 14 is stuck like before.

Audit Log says that it was deleted. Pls find the server logs here.

Update: I tried again (after 1.5 hours) and was able to delete the questionnaire. The link has the updated log file.

Next released version will contains improvements for deleting questionnaires.

@ashwinikalantri ,

the log seems to contain several different error messages. We suspect that there may be some of the legitimate queries failing at the time when the questionnaire is being deleted. You wrote that the questionnaire was ultimately deleted. Do you observe the new errors also after the questionnaire was successfully deleted? Do you use any external API queries? And does the submitter of those queries informed that the questionnaire has been deleted?

Thank you, Sergiy

We didn’t observe any errors but there is no active work going on in this workspace.

There were no external API calls to the questionnaire.

I don’t understand this last question.

From what I can see now, the assignments and the questionnaire are removed correctly.