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

fix!: avoid long running process when request timeout #309

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

KAKAinGoog
Copy link
Contributor

@KAKAinGoog KAKAinGoog commented Feb 12, 2024

 Previously function framework use 0 timeout which is actually "no timeout" restriction.
 This was causing a problem that when user provides a request timeout to Cloud function, process will still continue and consume resources.
 In this fix, timeout is enabled; default timeout settings is 5 min, same as Cloud run.
 To make sure timeout settings will be respected, default settings switched from multi-threads to multi-workers.

 However, user is still allowed to  customize workers/threads by assigning env var. But user need to note that timeout won't work when #thread > 1.

@KAKAinGoog KAKAinGoog marked this pull request as ready for review February 12, 2024 19:18
@KAKAinGoog KAKAinGoog changed the title feat!: Update default value for workers/threads; allow user customiza… feat!: Enable timeout Feb 12, 2024
@KAKAinGoog KAKAinGoog changed the title feat!: Enable timeout fix!: avoid long running process when request timeout Feb 14, 2024
 Previously function framework use 0 timeout which is actually "no timeout" restrction.
 This was causing a problem that when user provides a request timeout to Cloud function, process will still continue and consume resources.
 In this fix, timeout is enabled; default timeout settings is 5 min, same as Cloud run.
 To make sure timeout settings will be respected, default settings switched from multi-threads to multi-workers.

 However, user is still allowed to  customize workers/threads by assigning env var. But user need to note that timeout won't work when #thread > 1.
@HKWinterhalter HKWinterhalter merged commit 3d2095c into GoogleCloudPlatform:main Feb 14, 2024
46 checks passed
matthewrobertson pushed a commit that referenced this pull request Apr 29, 2024
Previously function framework use 0 timeout which is actually "no timeout" restrction.
 This was causing a problem that when user provides a request timeout to Cloud function, process will still continue and consume resources.
 In this fix, timeout is enabled; default timeout settings is 5 min, same as Cloud run.
 To make sure timeout settings will be respected, default settings switched from multi-threads to multi-workers.

 However, user is still allowed to  customize workers/threads by assigning env var. But user need to note that timeout won't work when #thread > 1.
matthewrobertson pushed a commit that referenced this pull request Apr 29, 2024
Previously function framework use 0 timeout which is actually "no timeout" restrction.
 This was causing a problem that when user provides a request timeout to Cloud function, process will still continue and consume resources.
 In this fix, timeout is enabled; default timeout settings is 5 min, same as Cloud run.
 To make sure timeout settings will be respected, default settings switched from multi-threads to multi-workers.

 However, user is still allowed to  customize workers/threads by assigning env var. But user need to note that timeout won't work when #thread > 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants