4/Nov 2018parallel-ssh
has a -I
option to feed in a shell script file such that quotes escaping is not needed.- On Ubuntu 14.04, the HAProxy may have 2 pids after
sudo service haproxy restart
. I suspect one of them is a zombie since the new open file limit does not apply. The safer way is to killall haproxy
then sudo service haproxy start
. - HAProxy has a
maxconn
globally and maxconn
for each frontend. The default for the latter is 2000. Make sure there is a maxconn
for the frontend. - Performance schema is your friend in MySQL. e.g. To debug tmp disk table usage, use
SELECT * FROM performance_schema.events_statements_summary_by_digest order by SUM_CREATED_TMP_DISK_TABLES desc limit 10\G
and you’ll find the problematic query. - Pipe
sleep
to another command can terminate a command which would otherwise require manual intervention. e.g. sleep 1 | openssl s_client -connect imap.gmail.com:993 -crlf | grep 'Gimap ready'
- In SQLAlchemy, commit inside a query loop is a bad idea. It requires refreshing all of the objects in session. The whole loop will be O(N^2).
- Sometimes eager loading is not the best idea in SQLAlchemy when a simple count is possible. Eager loading will load the discriminator column for polymorphic classes which may prevent the use of a covering index.