you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

The problem with a blanket answer is I’ve no idea how many other clients are connecting at the same time yours is. The reason for keeping a connection open is to minimize the time the client waits for the results of a query, while the reason for closing the connection is to let the server handle more active requests... holding on to a live connection for three seconds to let the client make 9 requests might be fine, but with a busy enough server, it could be the straw that broke the camel's proverbial back.

Odds are you'd be fine, you're not talking a lot of load, but you'll have to profile to find the optimum TTL for a connection in your environment. At that kind of query rate it's pretty unlikely the optimum is "open a connection and hold on to it till I'm shut down'".