RE: Lost connection during query when using SSH tunneling

2004-12-10 Thread Adams, Pat 006
> -Original Message-
> From: Karam Chand [mailto:[EMAIL PROTECTED] 
> Sent: Friday, December 10, 2004 2:17 PM
> To: Adams, Pat 006; [EMAIL PROTECTED]
> Subject: RE: Lost connection during query when using SSH tunneling
> 
> I am not sure of Putty as I am using plink.exe that is the 
> SSH tunneler for tunnel.
> 
> The thing is that I call up plink.exe from my app to create 
> an ssh tunnel and then set the correct values for 
> mysql_real_connect() in my app.
> 
> What I am doing is that I am bundling plink.exe with my app 
> and then ask the user for SSH info. Depending upon that I 
> create a plink.exe process and then connect my app to the SSH process.
> 
> I referred to Putty as many people seem to be using it and 
> putty usese plink.exe which is the back end for it.
> 
> Should I look into some options like what you suggested?

plink can use putty's saved sessions, so you could set one of those up.
Unfortunately it doesn't look like there's a command-line option to set
the timeout or keepalive settings of plink. 

--
Pat Adams
Applications Programmer
SYSCO Food Services of Dallas, L.P.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Lost connection during query when using SSH tunneling

2004-12-10 Thread Karam Chand
I am not sure of Putty as I am using plink.exe that is
the SSH tunneler for tunnel.

The thing is that I call up plink.exe from my app to
create an ssh tunnel and then set the correct values
for mysql_real_connect() in my app.

What I am doing is that I am bundling plink.exe with
my app and then ask the user for SSH info. Depending
upon that I create a plink.exe process and then
connect my app to the SSH process.

I referred to Putty as many people seem to be using it
and putty usese plink.exe which is the back end for
it.

Should I look into some options like what you
suggested?

Regards,
Karam



--- "Adams, Pat 006"
<[EMAIL PROTECTED]> wrote:

> > -Original Message-
> > From: Karam Chand [mailto:[EMAIL PROTECTED]
> 
> > Sent: Friday, December 10, 2004 12:08 PM
> > To: [EMAIL PROTECTED]
> > Subject: Lost connection during query when using
> SSH tunneling
> > 
> > So I use Putty to create the SSH tunneler and then
> connecting 
> > to the local port.
> > 
> > Now the problem, is that whenever I execute a long
> query or 
> > something that returns big resultset, i get an
> error - 
> > 
> > Lost connection during query.
> > 
> > If I use direct connection - everythings fine.
> 
> Putty has an option in the Connection category of
> the configuration for
> Seconds between keepalives. It's set to zero (off)
> by default. If you
> set it to > 0 number, putty will send a null packet
> at the server to try
> and keep the connection alive. Have you tried that?
> 
> --
> Pat Adams
> Applications Programmer
> SYSCO Food Services of Dallas, L.P.
> (469) 384-6009 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:   
>
http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Jazz up your holiday email with celebrity designs. Learn more. 
http://celebrity.mail.yahoo.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Lost connection during query when using SSH tunneling

2004-12-10 Thread Adams, Pat 006
> -Original Message-
> From: Karam Chand [mailto:[EMAIL PROTECTED] 
> Sent: Friday, December 10, 2004 12:08 PM
> To: [EMAIL PROTECTED]
> Subject: Lost connection during query when using SSH tunneling
> 
> So I use Putty to create the SSH tunneler and then connecting 
> to the local port.
> 
> Now the problem, is that whenever I execute a long query or 
> something that returns big resultset, i get an error - 
> 
> Lost connection during query.
> 
> If I use direct connection - everythings fine.

Putty has an option in the Connection category of the configuration for
Seconds between keepalives. It's set to zero (off) by default. If you
set it to > 0 number, putty will send a null packet at the server to try
and keep the connection alive. Have you tried that?

--
Pat Adams
Applications Programmer
SYSCO Food Services of Dallas, L.P.
(469) 384-6009 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Lost connection during query when using SSH tunneling

2004-12-10 Thread Rhino

- Original Message - 
From: "Karam Chand" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 10, 2004 1:08 PM
Subject: Lost connection during query when using SSH tunneling


> Hello,
>
> I have a MySQL database hosted with my ISP. They
> provide direction as well as thru SSH tunneling. I can
> very well connect to it diredctly from any app but I
> prefer to use SSH tunneling.
>
> So I use Putty to create the SSH tunneler and then
> connecting to the local port.
>
> Now the problem, is that whenever I execute a long
> query or something that returns big resultset, i get
> an error -
>
> Lost connection during query.
>
> If I use direct connection - everythings fine.
>
> Is this a known issue? Is this a bug with Putty?
>
> Regards,
> Karam
>
I don't have a lot of information for you, mostly just educated guesses.

I think you are experiencing a timeout due to the length of the query. It
seems reasonable to me that there would be a limit on how long a query could
run before it got killed; otherwise, if it was looping, you'd never get
break out of the loop. If I was writing the framework in which your query
was executing, I'd want a query to timeout automatically if it had been
running over a set amount of time. I'd set that value at a reasonable number
and give the user some way to change it if the default was too high or too
low.

Unfortunately, I don't know for certain that this is what's happening but it
seems pretty reasonable to me.

I use WinSSH to do the same sort of tunnelling you are doing and I have
never timed out yet. Then again, I haven't run any really long queries or
built any really large result sets either so maybe I've just been lucky. I
had a look at the WinSSH software and I don't see any kind of a timeout
setting in it. Therefore, I suspect that the timeout is being set at the
server itself. Unfortunately, I'm not sure where to start looking. Perhaps
if you search on 'SSH' in the manual, you will find that MySQL has a setting
that affects timeouts for SSH tunnels; if not, it might be a more global
setting somewhere on the server, perhaps in Apache.

Sorry I couldn't be more help.

Rhino


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Lost connection during query when using SSH tunneling

2004-12-10 Thread Karam Chand
Hello,

I have a MySQL database hosted with my ISP. They
provide direction as well as thru SSH tunneling. I can
very well connect to it diredctly from any app but I
prefer to use SSH tunneling.

So I use Putty to create the SSH tunneler and then
connecting to the local port.

Now the problem, is that whenever I execute a long
query or something that returns big resultset, i get
an error - 

Lost connection during query.

If I use direct connection - everythings fine.

Is this a known issue? Is this a bug with Putty?

Regards,
Karam




__ 
Do you Yahoo!? 
Send holiday email and support a worthy cause. Do good. 
http://celebrity.mail.yahoo.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]