Quoting Kishore Jalleda ([EMAIL PROTECTED]):

> What is happening is that when you start you perl script which
> contains a lot of queries, you are first establishing a connection to
> MySQL, and then you are running some queries, and somewhere in between
> you are losing connection to the server,

Well, yes and no. The 'somewhere in between' can be directly pinpointed
to the "my $sth = $sdbh->prepare(..query..);" call the perl script does.

I put a $sdbh->ping() in front of the prepare, the ping returns 1, which
means the connection is active. But still the connection drops when the
prepare is made.

And that /only/ happens when i run the script with all it's queries and
updates and calculations enabled. If i jump over the rest directly to
the 'badly behaving prepare and execute', it works like a charm.

> So I would suggest here that you make your Perl script auotmatic
> reconnect aware.

Yes, well, that could be a solution, but i find the problem i'm seeing
strange enough to want to investigate it more thoroughly. Especially
since the problem only started appearing recently.

> After this what you really have to diagonize is why you are losing
> connection to MySQL initially (i.e. at line 98)..

Yes. :)

> Since this is occuring only  intermittently I am guessing if your
> max_connections limit was reached

It's not as intermittently as you might think. I can reproduce it
easily. I just run the complete stats.pl script. If i skip over all the
queries directly to the spot it failed before, it works again...

Sounds like a 'Query Quota' or something silly like that :))

> at the time the connection was lost, what are your "wait_timeout" and
> "max_connections" settings, and are the initial queries very large...

| connect_timeout          | 5     |
| delayed_insert_timeout   | 300   |
| interactive_timeout      | 28800 |
| net_read_timeout         | 30    |
| net_write_timeout        | 60    |
| slave_net_timeout        | 3600  |
| sync_replication_timeout | 10    |
| table_lock_wait_timeout  | 50    |
| wait_timeout             | 28800 |

max_connections == 100. But nothing about a timeout or too many
connections is being logged. That's the strange part. There's no message
anywhere.

Thanks for all the ideas though!! Hope we can find out what's happening!

Regards,
Sander.
-- 
| The problem with dancing naked: not everything stalls when the music stops.
| 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]

Reply via email to