scrapoxy icon indicating copy to clipboard operation
scrapoxy copied to clipboard

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

Open georgecoca opened this issue 4 years ago β€’ 1 comments

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 avatar Sep 20 '19 11:09 georgecoca

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.

georgecoca avatar Sep 25 '19 07:09 georgecoca

multi providers + regions is implemented in 4.0.0

fabienvauchelles avatar Oct 04 '23 20:10 fabienvauchelles

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

fabienvauchelles avatar Dec 12 '23 22:12 fabienvauchelles