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

Using same provider multiple times doesn't work (DigitalOcean) #169

Closed
georgecoca opened this issue Sep 20, 2019 · 3 comments
Closed

Using same provider multiple times doesn't work (DigitalOcean) #169

georgecoca opened this issue Sep 20, 2019 · 3 comments
Milestone

Comments

@georgecoca
Copy link

Hello,

I've tried to use the same provider (DO) with different regions but it doesn't work. It only creates instances for the first provider from array. Now if I put a limit max for each provider it generates an error. See below.

Expected Behavior

Create instances from same provider on different regions. Example of the instance and providers configuration:

    "instance": {
        "port": 3128,
        "scaling": {
            "min": 1,
            "max": 4
        }
    },
    "providers": [
        {
            "type": "digitalocean",
            "token": "MY_TOKEN",
            "region": "fra1",
            "size": "s-1vcpu-1gb",
            "sshKeyName": "MY_KEY",
            "imageName": "MY_IMAGE",
            "tags": "proxy",
            "max": 2
        },
        {
            "type": "digitalocean",
            "token": "MY_TOKEN",
            "region": "lon1",
            "size": "s-1vcpu-1gb",
            "sshKeyName": "MY_KEY",
            "imageName": "MY_IMAGE",
            "tags": "proxy",
            "max": 2
        }
    ]

With this configuration I expect to have 2 instance on fra1 and 2 instances on lon1. But it only creates 2 instances from first provider (fra1), and that's because it has a max limit. It won't create another 2 instances for second provider (lon1).

Actual Behavior

It doesn't work, and it shows this error:

- debug: [Manager] checkInstances
- debug: [Manager] adjustInstances: required:4 / actual:2
- debug: [Manager] adjustInstances: add 2 instances
- error: [Manager] Error: Cannot update or adjust instances: askedInstances=2, security=false
- debug: [Instance/159648769] changeAlive: true => true

Specifications

  • Version of Scrapoxy: 3.1.1

Thanks,
George

@georgecoca
Copy link
Author

I come back with new details about this issue. I figured out that the issue above it only happens if the configuration its updated via API (eg. scaling, providers). With the same configuration if scrapoxy is started if finally works correctly, it creates instances on both regions, but not always creates equally on each region, sometimes I end up with 1 instance in fra1 and 3 instances in lon1, and some times 2 instances fra1 and 2 instances lon1. I guess this could be improved but at least it works.

Thanks.

@fabienvauchelles
Copy link
Owner

multi providers + regions is implemented in 4.0.0

@fabienvauchelles fabienvauchelles added this to the 4.0.0 milestone Oct 4, 2023
@fabienvauchelles
Copy link
Owner

Hey there! 🌟 Exciting news! Scrapoxy 4 is ready to rock 🚀. Check it out at Scrapoxy.io (explore the "get started" guide, deployment documentation, and more 📚).
I can't wait to hear your feedback on this new version! Send me your coolest screenshots with as many proxies as possible! 📸💻
Join the Discord community if you have any questions or just want to chat. You can also open a GitHub issue for any bug or feature request 🐞✨.
See you soon! 😎
Fabien

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

No branches or pull requests

2 participants