Cannot Cannot To Database

Hello Yii Friends

When I work in localhost in my computer I don’t get such problem…But when I have uploaded the file in server. Somes I get following message randomly which may come or not?

I would be greatful if anyone has solved this problem previously.Please let me know.

Thanks in Advance