Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wws hangs when running a Python project based on venv #101

Open
Angelmmiguel opened this issue Mar 3, 2023 · 2 comments
Open

wws hangs when running a Python project based on venv #101

Angelmmiguel opened this issue Mar 3, 2023 · 2 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@Angelmmiguel
Copy link
Contributor

Angelmmiguel commented Mar 3, 2023

Describe the bug

@Kaligraphy247 created a project to run a Python application with wws. After adding venv to setup the Python intial project, wws couldn't start the project. It hangs without printing anything and the CPU goes high.

When removing the venv context and keeping only the scripts, the project works fine.

He kindly created a repository to reproduce the issue: https://github.com/Kaligraphy247/python-wws-venv

Original report: https://twitter.com/kaligraph_jay/status/1629932602990682115

Reproduction steps

  1. Clone the repository (git clone https://github.com/Kaligraphy247/python-wws-venv)
  2. Install runtime deps (wws runtimes install)
  3. Run the project (wws)
  4. wws cannot start
  5. Switch to the minimal branch (git checkout minimal)
  6. Run the project (wws)
  7. It works

Expected behavior

The wws service can start the project or at least prints the related issue.

@Angelmmiguel Angelmmiguel self-assigned this Mar 3, 2023
@Angelmmiguel Angelmmiguel added the 🐛 bug Something isn't working label Mar 3, 2023
@Angelmmiguel
Copy link
Contributor Author

Hello @Kaligraphy247,

After debugging the repository, I found that the issue is related to wws trying to load all the py files in the site-packages folder as workers. Note that wws looks for workers on the current folder and any subfolder. This is causing wws to start processing many files and hanging up forever.

This issue is related to #47, as currently there's no way to ignore folders when running wws. However, I agree the current experience is not the best as you don't notice wws is loading those files.

I will create a separate issue to show a message about the number of files wws is going to process in advance. This message will help to identify this kind of issues.

@Kaligraphy247
Copy link

I just read issue #47 and I have to agree, .wwsignore or —ignore will work just fine. You could start with an —ignore option since it’s much easier to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants