Red Squirrel
No Lifer
I am troubleshooting an issue with an application where when it loses connectivity to the SQL server, it crashes. There's some random slowdowns that happen on my network all the time that cause this to happen, and while I gave up on trying to figure out what causes the slowdowns, I just want to make it so the application stops crashing when it happens. So basically I want to simulate loss of connectivity by running a script on the SQL server where it will kill existing connections as well as block new ones. From the application's point of view it will be like if the connection dropped which will allow me to troubleshoot my code as I'll be able to make it crash at will, then work on the code and keep testing until I solve the issue.
Adding a new IP tables rules does not account for existing connections and simply stopping the SQL service is not enough, because it will gracefully end any transactions and do cleanup, it needs to be a hard disconnect. I can't disable the network interface either, because the file system is on that same server and I don't want to affect that, just mysql connectivity.
I googled and found something called tcpkill but it's not in the repository for my distro (CentOS). I'm also not sure if it will do what I want as i think it actually sends a disconnect packet to the client. I need it to be more abrupt. Any ideas?
Worse case scenario suppose I can separate SQL from storage, and then just do the nic disable idea.
Adding a new IP tables rules does not account for existing connections and simply stopping the SQL service is not enough, because it will gracefully end any transactions and do cleanup, it needs to be a hard disconnect. I can't disable the network interface either, because the file system is on that same server and I don't want to affect that, just mysql connectivity.
I googled and found something called tcpkill but it's not in the repository for my distro (CentOS). I'm also not sure if it will do what I want as i think it actually sends a disconnect packet to the client. I need it to be more abrupt. Any ideas?
Worse case scenario suppose I can separate SQL from storage, and then just do the nic disable idea.
Last edited: