vserg has asked for the wisdom of the Perl Monks concerning the following question:

Hello!!!

Who can help me with problem:
DBD::mysql::st execute failed: MySQL server has gone away as ./insert.sh line 70, <GEN1> chunk 3278469.

In this line I insert records in loop...

I cannot understand how soluted this problem :(

Thank you

With best regard,
Sergey

Replies are listed 'Best First'.
Re: MySQL has gone away
by joealba (Hermit) on May 24, 2002 at 17:17 UTC
    Your MySQL server probably stopped. Start it up again.

    Check your error logs to see why it stopped.
Re: MySQL has gone away
by JayBonci (Curate) on May 24, 2002 at 22:56 UTC
    If you post some code, we may be able to help you more. You will also get this error if your mySQL process is killed through any sort of SQL process manager. The server may be running, but if it forcefully terminates your connection, then that may be what causes it.

    It's not in essence a perl question, but you may be messing up somewhere slightly in the code. Like I said, if you post it, a wizard may be able to lift the fog.

        --jb
Re: MySQL has gone away
by strredwolf (Chaplain) on May 25, 2002 at 19:38 UTC
    You sometimes get this with a heavily loaded SQL server, not just MySQL. If the connection between your script and MySQL gets dropped... well...

    What you can do sneakily is abstract it a bit, and if MySQL dies on you, you can catch it, sleep 60, and then try to reconnect silently. If it dies on the reconnect, then you got real trouble you need to die or croak on.

    --
    $Stalag99{"URL"}="http://stalag99.keenspace.com";