if it is taking that long to process an insert, It sounds like there is an issue with the php server connecting to the mysql server.
It sounds to me like the 2 issues would be symptoms of the same problem. Not really sure what the issue could be, but it sounds like a server configuration issue.