Skip to content

Deleting 60 sounds in moderation queue takes forever and can lead to 504 Gateway Time-out #2037

@qubodup

Description

@qubodup

Deleting 60 sounds in moderation queue takes forever and can lead to 504 Gateway Time-out

To reproduce

On https://freesound.org/tickets/moderation/assigned/[ID]/ delete 60 sounds in one batch.

A test account like https://freesound.org/people/freesoundtest111/ can be used for uploading a batch of sounds for testing..

This bash/sox one-liner can generate 60 test files: for i in {1..60}; do sox -n -r 48000 test_$i.ogg trim 0 $((RANDOM%61+60))s; done—although the tiny size is not comparable to real world scenarios, potentially it might lead to faster processing and avoidance of the error in Actual result.

Expected result

  • You return to above URL with the same speed as if you were to approve 60 sounds in one batch (usually somewhere around 2-15 seconds)

Actual result

  • The page loads for 60 seconds.
  • Then you either return to above URL or
  • you get a "504 Gateway Time-out" "nginx" message. I speculate that the chance of this happening might be related to the number of sounds in the batch and possibly internet speed. Simulating a slow connection or a proxy might be necessary to reproduce.
  • At the same time, if you open the above URL in another tab while this one is still loading, it will not contain the currently 'deleting' sounds, which makes it seem that the waiting is unnecessary.

Notes

I don't know whether this is related to #1049

At some point in recent years mod queue Approving/Deferring page refresh speed was improved significantly (as far as I know by moving the affected sounds out of the queue to be processed in the background). Perhaps the same method could be applied here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions