in reply to DBD::MySQL timeout during query
There are many possible reasons. net_read_timeout and net_write_timeout were added in 3.23.20. The read timeout (presumption query is select) default value is 30 seconds and setting it in the my.cnf file requires a restart (of MySQL) to take effect. It seems you know all this. I also assume that you are on Win32 as you are referring to a .INI file?
Although you query works off the command line the CGI environment is different. Webservers will abort connections after a period of inactivity, usually in the range 30-60 seconds. It is possible that your command line login runs the query with a higher priority. Establishing the exact time that it takes to timeout may be useful in tracking down the issue. Printing epoch time stamps before/after the query or the total time in the err msg may well provide a useful hint. Not that it is relevant but on *nix tcp(1) has a connect timeout of 75 seconds exact values often indicate the source.
This is a very long time for any query. Are you using appropriate primary keys/unique/indexes? You may benefit from having a look at 'DESCRIBE table_name' and 'EXPLAIN query_goes_here' to see if you can speed it up. This of course will not really solve the underlying issue but is worthwihile regardless.
If you post the query you may get some useful optimisation suggestions.
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBD::MySQL timeout during query
by rcraig (Initiate) on Sep 09, 2004 at 15:08 UTC | |
by tantarbobus (Hermit) on Sep 09, 2004 at 21:01 UTC | |
by tachyon (Chancellor) on Sep 10, 2004 at 00:18 UTC | |
by rcraig (Initiate) on Sep 10, 2004 at 15:57 UTC |