Actually, it's not the db. The php processes have been dying, leaving the poor web server with nothing to talk to.
The reason swat was not affected is that it runs from a different webserver and a different database process.
“The egg hatched...” “...the egg hatched... and a hundred baby spiders came out...”
“Who are you?” “A friend. I'm here to prevent you from making a mistake.” “You have no idea what I'm doing here, friend.” “In specific terms, no, but I swore an oath to protect the world...”
“It's a goal you won't understand until later. Your job is to make sure he doesn't achieve the goal.”