slow website, cpu / mem at 100%? — banning IPs on aws lightsail

this is a note-to-self about a bandaid:

back / debug story

Periodically and increasingly frequently over the last few years my website would get super slow and I would just restart mysql. usually then things were happy. This time I restarted mysql and also restarted the entire server and it was still laggy (thanks possibly llm scrapers?)

( One time I was looking up project prior art and an LLM confidently linked to my blog post as prior work, but specified my friend by full name as the author lol )

Turns out the issue was actually just some bot attack exhausting server resources, per @gongomgra https://github.com/bitnami/vms/issues/420#issuecomment-1288922908

Diagnose the IP by tailing the apache access log:

Running: tail -n 100000 access_log | awk '{print $1}' | sort | uniq -c | sort -nr | head -n 10 | awk '{print $1}'
In: /opt/bitnami/apache2/logs/

7432 34.32.72.73
1039 144.76.32.235
206 <turned out to be my own ip oops lol, connected to my phone hotspot to undo>

per aqyno 

Ban the IP with iptables:

sudo iptables -A INPUT -p all -s 1.2.3.4 -j DROP 
# to undo:
sudo iptables -D INPUT -p all -s 1.2.3.4 -j DROP

Note that this is not persistent across reboot.

Also note this is because my instances is so old I can’t upgrade easily nor apt install anything anymore (eg the usual fail2ban, ufw, etc.), but I’m too lazy to do a wordpress migration right now. 

Obviously a band-aid since some new ip will come around in a day or a week. But meh, happy with how fast my website runs again, briefly. A little sad that this probably costs me like $3/month in hosting costs though :///

UMI gripper build, with video of mechanism

Wow the UMI gripper is much bigger than I expected, really not suited for what I want to do. I had planned to modify it into an actuated gripper to mount onto the UR5, probably using a timing belt ala Actuated-UMI.

But I built it and it’s a beast.

Here’s what the internal mechanism looks like.

Linear Rails

The interesting part is the MGN9C 150mm Linear Rail.

Per: https://www.circuitist.com/hiwin-linear-rails-guide/, MGN is a popular Taiwanese manufacturer of linear rails, and their naming scheme was co-opted by cheaper manufacturers. So only the last two letters matter: 9C then stands for 9mm rail width, and C for standard carriage (vs. H flor long carriage), where carriage is the block that rides on the rails). The 150mm is the length of the rail, and so the effective travel is that minus the carriage width. In the UMI gripper we buy two rails, but only use the carriage from the second rail.

What was bizarre to me is how easily the ball bearings fall out of the raceways if you remove the carriage! It was a real “WTF” moment.

“The balls inside linear rail blocks can very easily fall out of their raceways when removed. If you need to remove a block for maintenance, slide it off slowly over a bowl or tray.” — Circuitist

Video

Here’s it assembled.

Well, kudos that they documented everything enough that you can actually build it!

End Post.

Todo: I might write up more notes on how I printed things later (I think mostly 20% infill). I’m not interested in the SLAM / data collection at the moment, so I didn’t need to fidget with the mirrors and QR code and camera and such.

projects blog (nouyang)