Created
January 9, 2019 13:26
-
-
Save jarifibrahim/76def0939fb82b01897df2e3355f6f46 to your computer and use it in GitHub Desktop.
Launcher backend failure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set +x | |
pid=$(pidof "java") | |
# Let's bombard the server with reindex requests | |
for i in {1..15} | |
do | |
# Using random sleep time | |
sleep .0$[ ( $RANDOM % 10 ) + 2]s | |
curl -H "Content-Type: application/json" -X POST -d '{}' "http://localhost:8080/api/booster-catalog/reindex?token=abc" | |
done | |
# Wait for 10s so that all the requests are processed | |
sleep 10s | |
echo "Number of open files -" $(ls -l /proc/$pid/fd | wc -l) | |
echo "System limit on number of open files -" $(ulimit -Hn) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment