Help with "OSError: Cannot find empty port in range: 7860-7860"

I am trying to deploy an app using Gradio SDK but I keep getting the following error: OSError: Cannot find empty port in range: 7860-7860. You can specify a different port by setting the GRADIO_SERVER_PORT environment variable or passing the server_port parameter to launch().

There is a similar post that covered the same issue: All ports in use - Beginners - Hugging Face Forums. But it was not helpful because the OP chose the wrong SDK. I deleted and created a new space to double check that I selected the Gradio SDK and I am still facing the same issue.

Other things I have tried:

  • Restarting space
  • Factory rebuild
  • Tried other ports (7861, 7862, etc.)

None have worked and I am at a loss on how to resolve this.