Hmm, this line is definitely not good:

"SQL Error: MySQL server has gone away"

That basically means your mysql server has died or stopped responding for that query. Is this your own server or are you on a hosted server?