-
Notifications
You must be signed in to change notification settings - Fork 204
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
Question: Add max instances to runtimeOptions? #566
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
I was looking for this today +1 |
I would love to have this. Is it just a matter of updating the typing? I can enter a PR if it would help. |
Hi there, thanks for request! We don't have plans to implement this, but I'm happy to discuss your idea with the team. Can you provide more details for this proposal and implementation? |
Hey @alexlouden. We need more information to resolve this issue but there hasn't been an update in 7 days. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
@andrianabeltran I am not sure about |
Hey @alexlouden. We need more information to resolve this issue but there hasn't been an update in 7 days. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @alexlouden if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
Hey @andrianabeltran, sorry for my delayed reply - had my laptop away for the holidays! At the moment you can specify exports.myLongRunningFunction = functions
.runWith({
timeoutSeconds: 540,
memory: '2GB'
})
... When you edit the deployed cloud function via the GCP Cloud Functions web interface in addition to the above there are the following options - you can enable "Retry on failure", and specify "Maximum function instances": The ability to specify a failure policy (basically a way to enable "Retry on failure") was just added - see #482 and firebase/firebase-tools#1858 (@samtstern is working on this). I'd like to be able to specify timeout, memory, retry and also maximum function instances all via the exports.myLongRunningFunction = functions
.runWith({
timeoutSeconds: 540,
memory: '2GB',
retry: true,
maxInstances: 15
})
... The aim is to make the source code the source of truth for the cloud function's config, so we don't have to manually edit functions' config via the web interface at all - this proposal would mean the GUI, CLI and the runtime options would all be at parity :) I hope this makes sense! Please let me know if you have any more questions :) |
This seems reasonable. There's an internal process for approving new API changes, and I've just kicked it off to take a look at this. I can't guarantee when we'll be able to implement, but if anyone in the community has the time to make PRs we'd be happy to review 😄 |
Hey @alexlouden. We need more information to resolve this issue but there hasn't been an update in 7 days. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Thanks for that @mbleigh! Is there a way to stop the bot from automatically marking this as stale? |
Sorry about that! The bot will back off now. |
this feature would be great for us to handle with contingents and limit the progress of work of pubsub topic |
I've patched the code to support max instances |
Adding this to runtime options would be incredibly useful. Can we do that @efiShtain? |
@rafaelrene I use it like this:
|
@efiShtain that sounds great did you make a pull request? Maybe reference it from here would be great. Thank you 🙏 |
@StatusQuo |
any news on that? |
@bolds07 |
@efiShtain I am really sorry about the delays here, I ran into some technical issues on the backend with a different but similar PR (the one to enable |
This issue was fixed by #624, so I am closing it. Thank you again to everyone for your contributions and your patience, we should have moved faster and we will try and do better in the future. |
How does google server take in consideration the maxInstances value? I've a function with maxInstances set to 1... this function does simple return the currentTimeMillis so takes maximum 0.3 seconds to run (worst case). AND STILL GCF HAS 200 INSTANCES OF IT so what is the point of that? well as my graph shows THERE WASNT ANY TIME wihtout exceeding the im sorry if i'm being rude but it is clear that this whole parameter is just a waste of time for either you engineer team as for any developer trying to use your infrastructure |
For me worked without problem. Verify any typo mistake. |
I've been reading through #425 (@merlinnot's proposal to add
retry
toruntimeOptions
) and I was wondering whether it would make sense to addmax-instances
too? Or should this wait until max-instances is out of beta?At the moment all our firebase cloud functions are deployed via CD - we try and avoid using the gcloud CLI or the web console. (I've actually only recently discovered that retry and max-instances existed!)
The text was updated successfully, but these errors were encountered: