-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Long running Cloud Functions are self-executing #4091
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
Comments
Who is calling this function? If it's from the SDKs, then probably it reached the timeout and retried for a few times. If that's the case, you should configure the number of retries to 0. |
Check this issue here: #3651 |
Thanks for the heads up. I'm using the Javascript SDK but I can't seem to find the option to set retries. http://docs.parseplatform.org/js/guide/#getting-started Mind if you point me to the right direction? :) |
I don't think you can set the timeout in the Javascript SDK (as with most of the other Parse SDKs). I haven't worked with Javascript in great detail, but let me show you some indication why I think this. The following file is where REST commands are sent. This occurs in the function In either case, there are timeout variables for each type that can be set but are not and there are no options to. The one odd thing that I cannot figure out is that the timeout is supposed to be infinite if not set, which is not the case for you. |
@justingosan you should not have long running functions otherwise you'll hit the timeout, you should return early if your cloud function is that long, otherwise consider starting a lightweight Task and let the user wait for the result through live queries for example. |
For anyone finding this issue from google, note that you may be able to configure the max retries via the sdk using APIs like discussed in https://community.parseplatform.org/t/how-can-i-set-request-attempt-limit-or-another-request-params-for-cloud-functions/929 |
Issue Description
Long running Cloud Functions are self-executing.
Steps to reproduce
Have a really long running Cloud Function
and execute it once
Parse.Cloud.run('longRunningFn');
Expected Results
Should only run once (1 log line)
Actual Outcome
After a while of running, it will execute again... and again.. and again..
Environment Setup
Server
Database
Logs/Trace
Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment.
The text was updated successfully, but these errors were encountered: