Do a "show status like 'uptime'" after the script runs.  See if the
server crashed (if so, uptime will be low) -- if the server crashed
you might get that error.

show variables like "%connections" should show you how many
connections you can have per user and total.  That shouldn't be the
problem; you'd get a "too many connections" error if that was the
problem, but it couldn't hurt to check.

show grants for your user to see if you have any limits on your user resources:
http://dev.mysql.com/doc/refman/4.1/en/user-resources.html

again, the errors would be different.

What's max_allowed_packet set to?

You said you can run the query just fine -- did you just try on
commandline, or can you run the query in a script by itself?

What happens if you run the script to echo all the SQL commands into a
text file, and then source the text file from the mysql commandline
prompt?  Same error?

Are the script and the host on the same machine?  Is it using TCP/IP
to connect, or a unix socket?  Is there any firewalling in place?

Does anyone else have admin privileges to the database?  They might be
manually killing the query, if it hangs up.  (I've had this done to
me, where an admin kept killing long queries without asking folks who
was doing them).

Are you working on an InnoDB table?  Try turning on the InnoDB monitor
while the query runs and see if you're getting any deadlocking. http://dev.mysql.com/doc/refman/5.0/en/innodb-monitor.html

-Sheeri


On 5/5/06, Sander Smeenk <[EMAIL PROTECTED]> wrote:
Quoting Kishore Jalleda ([EMAIL PROTECTED]):

> >Can anyone shed any light on this issue?

> This might shed more light into your problem
> http://dev.mysql.com/doc/refman/5.0/en/gone-away.html

I've read that :)

But still, the query returns the same data, if I run it alone, or in the
complete stats script. Please tell me (how i can find out) why the
script bails out when i run alot of other queries in front of it, and
why it works when i run just that query?

Actually none of the 'reasons' listed at the url you gave me, really
apply to my situation.

Except maybe the "You can also get these errors if you send a query to
the server that is incorrect or too large." topic. But still, explain to
me, why DOES it work when i run just that query, and why DOESN'T it work
when alot of other queries were in front of it...

:)
Sander.
--
| Depression is merely anger without enthusiasm.
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8  9BDB D463 7E41 08CE C94D

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



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

Reply via email to