diff options
author | Mark Wielaard <mark@klomp.org> | 2023-04-14 18:10:48 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2023-04-14 18:10:48 +0200 |
commit | bf6ed48707969cbb1fa4ee7409aeae24c5905e42 (patch) | |
tree | 9c7444a36d970506233d49566c97cadde36320db | |
parent | d8d1900ace46542e0fd4e0cec8af2324166109e4 (diff) | |
download | elfutils-users/mark/try-maxreq.tar.gz |
tests: Limit the number of concurrent requests in debuginfod-federationusers/mark/try-maxreq
It seems doing 100 parallel requests can crash some versions of
libmicrohttpd so limit the number a little to the number of processors
times 4, with a max of 64.
* tests/run-debuginfod-federation-metrics.sh: Use nproc * 4, or 64
for seq curl requests.
* tests/run-debuginfod-federation-sqlite.sh: Likewise.
Signed-off-by: Mark Wielaard <mark@klomp.org>
-rwxr-xr-x | tests/run-debuginfod-federation-metrics.sh | 4 | ||||
-rwxr-xr-x | tests/run-debuginfod-federation-sqlite.sh | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/run-debuginfod-federation-metrics.sh b/tests/run-debuginfod-federation-metrics.sh index 3d716246..0692e4fb 100755 --- a/tests/run-debuginfod-federation-metrics.sh +++ b/tests/run-debuginfod-federation-metrics.sh @@ -191,7 +191,9 @@ curl -s http://127.0.0.1:$PORT2/metrics | grep 'dc_pool_op.*reuse' # Use a file that hasn't been previously extracted in to make it # likely that even this test debuginfod will experience concurrency # and impose some "after-you" delays. -(for i in `seq 100`; do +maxreq=$[$(nproc) * 4] +maxreq=$(( $maxreq > 64 ? 64 : $maxreq )) +(for i in `seq $maxreq`; do curl -s http://127.0.0.1:$PORT1/buildid/87c08d12c78174f1082b7c888b3238219b0eb265/executable >/dev/null & done; wait) diff --git a/tests/run-debuginfod-federation-sqlite.sh b/tests/run-debuginfod-federation-sqlite.sh index d9321526..6b090074 100755 --- a/tests/run-debuginfod-federation-sqlite.sh +++ b/tests/run-debuginfod-federation-sqlite.sh @@ -157,7 +157,9 @@ testrun ${abs_top_builddir}/debuginfod/debuginfod-find debuginfo $BUILDID # Use a file that hasn't been previously extracted in to make it # likely that even this test debuginfod will experience concurrency # and impose some "after-you" delays. -(for i in `seq 100`; do +maxreq=$[$(nproc) * 4] +maxreq=$(( $maxreq > 64 ? 64 : $maxreq )) +(for i in `seq $maxreq`; do curl -s http://127.0.0.1:$PORT1/buildid/87c08d12c78174f1082b7c888b3238219b0eb265/executable >/dev/null & done; wait) |