Timeouts
am 05.04.2005 04:24:13 von Leigh Sharpe
------=_NextPart_000_006E_01C539DA.609AF930
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi All,
Is it possible to define a timeout for a particular SELECT?
I'm using the Perl DBD::MySQL interface to access a MySQL database. I =
have the mysql_connect_timeout set to 2 seconds. The script connects OK, =
but when I issue a SELECT, the response takes a considerable amount of =
time to return (well over 5 minutes in some cases). This is playing =
havoc with the timing of the script. I need a way to have the thread =
abort if it can't get a response in a pre-defined period of time.=20
Anybody got any ideas?
------=_NextPart_000_006E_01C539DA.609AF930--
Re: Timeouts
am 05.04.2005 04:57:07 von Randy Clamons
Leigh,
Try indexing all tables involved in query to optimise performance. Five min=
utes is a long time for a query. A few things to consider:
Do you get the same response when entering the query in mysql console? =
Are you retrieving more information than you need from the query for the pa=
ge you wish to create? =
Perl will gobble up memory if you're not careful--when it becomes memory-bo=
und, it will slow to a crawl.
Randy Clamons
Systems Programming
Novaspace.com
> ------------Original Message------------
> From: "Leigh Sharpe"
> To: win32@lists.mysql.com
> Date: Mon, Apr-4-2005 7:24 PM
> Subject: Timeouts
>
> Hi All,
> Is it possible to define a timeout for a particular SELECT?
> I'm using the Perl DBD::MySQL interface to access a MySQL database. I =
> have the mysql_connect_timeout set to 2 seconds. The script connects OK, =
> but when I issue a SELECT, the response takes a considerable amount of =
> time to return (well over 5 minutes in some cases). This is playing =
> havoc with the timing of the script. I need a way to have the thread abor=
t =
> if it can't get a response in a pre-defined period of time. =
> Anybody got any ideas?
> =
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
Re: Timeouts
am 05.04.2005 05:02:54 von Leigh Sharpe
> Try indexing all tables involved in query to optimise performance. Five
minutes is a long time for a query. A few things to consider:
>
When it happens, it happens for all queries.
> Do you get the same response when entering the query in mysql console?
Yep.
> Are you retrieving more information than you need from the query for the
page you wish to create?
Nope. It's usually wjile there's an optimise happening, or similar
house-keeping type stuff.
> Perl will gobble up memory if you're not careful--when it becomes
memory-bound, it will slow to a crawl.
Actually, the problem is due to a severely overloaded MySQL server, but I
have a handful of apps accessing it (from another machine) which are
timing-critical, and need to work around the issue for the moment.
Ultimately, I intend to reduce the bottleneck on the server, but I need a
quick fix for the long timeout issue first.
----- Original Message -----
From: "Randy Clamons"
To: "Leigh Sharpe" ;
Sent: Tuesday, April 05, 2005 12:57 PM
Subject: Re: Timeouts
> Leigh,
>
> Try indexing all tables involved in query to optimise performance. Five
minutes is a long time for a query. A few things to consider:
>
> Do you get the same response when entering the query in mysql console?
>
> Are you retrieving more information than you need from the query for the
page you wish to create?
>
> Perl will gobble up memory if you're not careful--when it becomes
memory-bound, it will slow to a crawl.
>
> Randy Clamons
> Systems Programming
> Novaspace.com
>
>
> > ------------Original Message------------
> > From: "Leigh Sharpe"
> > To: win32@lists.mysql.com
> > Date: Mon, Apr-4-2005 7:24 PM
> > Subject: Timeouts
> >
> > Hi All,
> > Is it possible to define a timeout for a particular SELECT?
> > I'm using the Perl DBD::MySQL interface to access a MySQL database. I
> > have the mysql_connect_timeout set to 2 seconds. The script connects OK,
> > but when I issue a SELECT, the response takes a considerable amount of
> > time to return (well over 5 minutes in some cases). This is playing
> > havoc with the timing of the script. I need a way to have the thread
abort
> > if it can't get a response in a pre-defined period of time.
> > Anybody got any ideas?
> >
>
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org