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

test: add cloud test for reproducing timeouts #150

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

steve-chavez
Copy link
Member

@steve-chavez steve-chavez commented Sep 17, 2024

This is a test that can only be ran manually since it requires AWS. It adds NixOps wrapper scripts to reproduce #86.

The steps are:

$ net-cloud-deploy
$ net-cloud-reproduce-timeouts
NOTICE:  Waiting until 10000 requests complete
NOTICE:  Stats: {"request_successes":8882,"request_failures":1118,"last_failure_error":"Timeout was reached"}
NOTICE:  Time taken: 00:01:44.341157

Then destroy the cloud setup with net-cloud-destroy

Note that it takes 01:44, it should be ~50 seconds to finish processing all the 10K requests, considering batch_size=200 (the default).

Also change logging level of curl
- Add workers
- Add correct media type to /post
@steve-chavez
Copy link
Member Author

As a follow up note, I can't reproduce this on the #139 branch.

I believe this is due to select (which curl_multi_perform uses) vs epoll performance. There's some internal extra time required for getting all responses.

nix/nixops.nix Outdated Show resolved Hide resolved
This uses NixOps wrapper scripts to reproduce
supabase#86.

The steps are:

```
$ net-cloud-deploy
$ net-cloud-reproduce-timeouts

net-cloud-reproduce-timeouts
NOTICE:  Waiting until 10000 requests complete
NOTICE:  Stats: {"request_successes":8882,"request_failures":1118,"last_failure_error":"Timeout was reached"}
NOTICE:  Time taken: 00:01:44.341157
```

Then destroy the cloud setup with `net-cloud-destroy`
@steve-chavez
Copy link
Member Author

Modified the script to now include the actual time taken to process all requests. See above

@steve-chavez steve-chavez merged commit 16a7f47 into supabase:master Sep 17, 2024
5 checks passed
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.

2 participants