Resolved this issue by changing the timeout from 300s to 1000s. I hope this can help people who encounter a similar issue.