Is it the connection you're timing out on or the execution of the command? It might be the command timing out, which I believe are two different things entirely.
I'm a novice at this but it's my understanding that there's a difference between the connection timeout (how long to wait for a connection to the database - which is likely timing out if there's a problem connecting in general) and a command timeout (how long to wait when executing command). I had some issues on a project executing long-running commands. I think the default was 30 seconds thought it may differ by DB. In that situation, I could set it to a value of 0 and it wouldn't time out. Wondering if this is really the command timeout that you want to increase instead.
I believe you have to set the command timeout on a per-command basis as part of the command.
Here's a SO post about that.
Just a thought.