Unable to delete table or table entries

I have a table with 2 columns and ~3000+ records. When I try to delete all records, the network request gives 504 error and nothing happens.

Same thing happens when I try to delete the list.

I think some optimization is needed on the backend side.

Update - it deleted after a while, its just not handled the best on frontend it seems.