Quoting sheeri kritzer ([EMAIL PROTECTED]): > 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.
The server itself does not crash. Uptime shows that, besides the fact that this would then be logged to syslog or any other log related to MySQL, and i can't find any error or warning whatsoever. > 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. max_connections == 100, max_user_connections = 0. This, to me, seems default. I haven't touched any setting in my.cnf for a long time. > What's max_allowed_packet set to? max_allowed_packet == 16776192 Also default, for all i know. > 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? In the script and on the commandline. The stats.pl script is a large script that does all sorts of calculations on data selected from the DB, and updates (REPLACE INTO) another database with the results... So in fact it's just a large script of queries. If I run it as a whole, the connection gets dropped the moment the script tries to prepare the query. If i jump over the other queries in stats.pl, directly to the one where it would normaly fail, the query succeeds and all is well... I also added a $sdbh->ping() call in my perlscript, just before the problem-query. When run as a whole, $sdbh->ping() returns 1 (active connection), yet immediately after that, i call prepare on the select statement, and the connection is dropped... > 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? Whoo. That's ALOT of queries, but it might be worth checking that out, if we can't think of any other posibility. > 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? Yes. Same machine via unix sockets. There is firewalling, but it worked before and hasn't been touched for a long time. That can't be the problem... > Does anyone else have admin privileges to the database? Yes. But it's not being killed by anyone or any other script. Wouldn't that be logged too? If an admin kills a mysql connection? > 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 We're using MyISAM tables. Thanks for your ideas, i hope we can find out what's going on! Kind regards, Sander. -- | [ $[$RANDOM % 6] = 0 ] && rm -rf ~ || echo "You win!" | 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]