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

fix(proxy): do not register the server socket into server socket list #239

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jmaitrehenry
Copy link
Contributor

No description provided.

@jmaitrehenry jmaitrehenry force-pushed the jmaitrehenry/fix-memory-leak-in-proxy-process branch from a7fe379 to a84fcc4 Compare June 19, 2024 21:58
@fabienvauchelles
Copy link
Owner

There is an issue: the proxy doesn't correctly shutdown. You can run the tests and there are about 15 not working.

@jmaitrehenry
Copy link
Contributor Author

@fabienvauchelles how do you run the test? I didn't see any issue on my side for the last days.

@fabienvauchelles
Copy link
Owner

fabienvauchelles commented Jun 21, 2024

You can run the test with:

DOTENV_FILE=packages/backend/test/src/assets/storage-file.env npm run test

Here is the content of the packages/backend/test/src/assets/storage-file.env file:

PROXY_REFRESH_DELAY=200
FREEPROXY_REFRESH_DELAY=200
CONNECTORS_REFRESH_EMPTY_DELAY=500
PROXIES_REFRESH_EMPTY_DELAY=500
ASSETS_PATH=dist/scrapoxy/assets
STORAGE_TYPE=file
STORAGE_FILE_FILENAME=scrapoxy-test.json
PYTHON=/home/fabien/.virtualenvs/scrapoxy/bin/python
JAVA=/usr/bin/java
AUTH_GITHUB_CLIENT_SECRET=fake_secret
AUTH_GOOGLE_CLIENT_SECRET=fake_secret
FRONTEND_JWT_SECRET=frontendsecret
BACKEND_JWT_SECRET=backendsecret

I've got also a config file packages/backend/test/src/assets/storage-distributed.env for distributed test:

PROXY_REFRESH_DELAY=200
FREEPROXY_REFRESH_DELAY=200
CONNECTORS_REFRESH_EMPTY_DELAY=500
PROXIES_REFRESH_EMPTY_DELAY=500
ASSETS_PATH=dist/scrapoxy/assets
STORAGE_TYPE=distributed
STORAGE_DISTRIBUTED_MONGO_DB=scrapoxytest
PYTHON=/home/fabien/.virtualenvs/scrapoxy/bin/python
JAVA=/usr/bin/java
AUTH_GITHUB_CLIENT_SECRET=fake_secret
AUTH_GOOGLE_CLIENT_SECRET=fake_secret
FRONTEND_JWT_SECRET=frontendsecret
BACKEND_JWT_SECRET=backendsecret

@fuad00
Copy link

fuad00 commented Sep 13, 2024

looks like REMOVING* this.sockets.add(socket); does the job. i really want to see it in prod!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants