by Ken Task.
Ok, so line '5090' of what file?
'server has gone away' errors are most often max_packet related, but could also be network. So is the DB on local host or is the DB server another box? Running what version of Moodle? Running what OS (Wonders?)?
Also suggest pasting all of debug here so we can see all of what is being reported. Could be an issue with a mod/block or something in the course.
'spirit of sharing', Ken