Solving MySQL Connection Leaking

The Problem

Our MySQL connections were leaking, causing too many open connections error. With the result, we were losing a lot of webhooks in Shopify. There were two ways to approach the problem – one is to start digging into the codes directly and fix the problem. Second one was to solve the problem with a hack and then dig deeper into codes.

Solution

[mysqld]
connect_timeout=2
#2 seconds are more than enough for any web request to handle.

Solving MySQL Connection Leaking

One thought on “Solving MySQL Connection Leaking

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top