Database connection pooling with firewall troubleshooting tip: Use Netcat

Database connection pooling is useful and common feature for performance. However there are some cavets.
Sometimes your sql query just got timed out, and you wonder why.
If you suspect the TCP connection between your application hosted in DMZ to the database (which is usually sits behind a firewall) got dropped by the firewall. It is very likely firewall has a policy to terminate any idle connection.

Let’s go back to the basics to use Netcat.

Server(internal machine):
nc -v -l 9999

Client (DMZ machine):
nc 9999

Assuming port 9999 is allowd on the firewall.

Let’s assume the firewall drops the connection after 30 minutes idle time, then the nc will be broken after 30 minutes.

Advertisements
This entry was posted in firewall, netcat. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s