Yii Database connection error

1

I am using an application in Yii and Postgres database. When I run the application on live server(not local system) I am getting this error

CDbConnection failed to open the DB connection: SQLSTATE[08006] [7] could not connect to server: No buffer space available (0x00002747/10055) Is the server running on host "localhost" and accepting TCP/IP connections on port 5432?"

When I contact with server support team they told to close the db connection after each transaction. I would like to know how to close database connection after each transaction in yii with PostgreSQL?

This is my database connection code in main.php

'db'=>array( 'class'=>'CDbConnection', 'connectionString' => 'pgsql:host=localhost;port=5432;dbname=crescent_6', 'emulatePrepare' => true, 'username' => 'postgres', 'password' => 'root', 'charset' => 'utf8', ), 'cache' => array ( 'class' => 'system.caching.CDbCache', ),
postgresql
yii
asked on Stack Overflow Sep 27, 2016 by Bipin • edited Sep 28, 2016 by Bipin

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0