AnykeyNL / OCI-AutoScale

Automatic Scaling for OCI BM Database Cloud Service (Schedule based)
Universal Permissive License v1.0
113 stars 67 forks source link

Multiple script runs are necessary to start/stop all virtual machines. #4

Closed Reuenthal767 closed 4 years ago

Reuenthal767 commented 4 years ago

Hello @AnykeyNL thank you for your hard work on this script!

I'm experiencing this problem: on my environment the OCI-AutoScale script runs every hour (5 ) but unfortunately not all machines are started (or stopped) in one go, it usually takes 2 or 3 script runs to have every vm in the desired state.

Have you ever encountered this issue? Could it be related to API Request Rate limits ( https://community.oracle.com/docs/DOC-1015335 )?

Maybe the multithreaded approach is too fast and raises a too many requests error ?.

AnykeyNL commented 4 years ago

Any idea how many stop/stop operations occur at the same time in your environment? Possibly it is the rate limit.

Reuenthal767 commented 4 years ago

Thank you for your reply. I'm starting around 60 VMs in the morning and stopping the same amount in the evening. It will be a lot more in the future though.

AnykeyNL commented 4 years ago

I will create 100 vms in my environment and do some testing :-) Home my budget allows me to :-)

Reuenthal767 commented 4 years ago

That would be awesome! Thanks!

AnykeyNL commented 4 years ago

Added rate limit support and tested it with 100VMs, my credit card is now over limit ;-) (kidding). All seems to work now.

Reuenthal767 commented 4 years ago

That's amazing @AnykeyNL ! Thank you very much! We all know that black AE does not have any limit :P