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

Add logic to identify insufficient resources causing timeout #217

Open
bpgould opened this issue Oct 20, 2023 · 5 comments
Open

Add logic to identify insufficient resources causing timeout #217

bpgould opened this issue Oct 20, 2023 · 5 comments

Comments

@bpgould
Copy link

bpgould commented Oct 20, 2023

The step function kept failing on the lowest memory option that I provided. This was due to a timeout on the lambda. Either the powertuning step function should also increment timeout (not ideal) or it should recognize if every execution on a particular memory amount fails, it is not enough memory and proceed with the other values. I have achieved similar functionality before when using parallel states. Moreover, this greatly decreases the value of the tool because it is hard to implement in automation if I need to remove all of the lower memory values in order to achieve reliability of the step function.

@bpgould
Copy link
Author

bpgould commented Oct 20, 2023

also for another issue, it only supports up to 3,008 mb but lambda supports 10,240.

@alexcasalboni
Copy link
Owner

alexcasalboni commented Oct 23, 2023

Hi @bpgould - thanks for reaching out :)

Can you tell me more about your timeout issue? By default, the tool times out (each step) after 5 minutes. But you can change this by customizing the totalExecutionTimeout deployment parameter (this needs to be set when you deploy the application).

Regarding the memory requirements, you are correct. You do need to be aware of what's the minimum memory your function needs to operate properly (and not try to power-tune with lower memory). The tool currently works under the assumption that your function run properly with the given configurations.

About the 3,008MB limit, that sounds odd. Are you using a recent version of the app? As documented here, you can provide any power values between 128MB and 10,240MB, and please note that new AWS accounts have reduced concurrency and memory quotas, 3008MB max.

@bpgould
Copy link
Author

bpgould commented Oct 23, 2023

@alexcasalboni thank you for your response. The memory limit was my issue, however, I think an enhancement is needed for the other issue. If I am deploying powertuning at scale to run in an account with 100 lambdas, how would I know what the min memory is for each lambda?

The tool should have an option to process timeouts = insufficient memory, this way for lambdas that can run with 128mb, the tool will run them and I don't have to set something much higher to accommodate other functions that require more. Perhaps this is a contribution that I could make.

@alexcasalboni
Copy link
Owner

@bpgould I think that adding support for this use case makes sense.

Practically, you still need to go function-by-function and craft a specific payload for each function if you want to power-tune 100+ functions in your account. But I agree that being forced to know the minimum memory each function requires is a bit too much :)

So what would you prefer to see in the state machine output and in the final visualization in case one (or more) memory configurations aren't enough to run your function? We wouldn't have any data point to plot on the chart, so we'd just leave it empty?

@alexcasalboni
Copy link
Owner

@bpgould I was thinking that we could add a new input parameter called ignoreTimeouts=true|false, so the state machine would ignore timeouts and simply not include them in the results.

Would that work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants