About could not connect to server: Connection timed out

Поиск
Список
Период
Сортировка
От 黄永卫
Тема About could not connect to server: Connection timed out
Дата
Msg-id 4add38d5.171bf30a.7a5e.ffffab15@mx.google.com
обсуждение исходный текст
Ответы Re: About could not connect to server: Connection timed out  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general

Hi,

 

 When I use ecpg  code to download File from database, error  occurred  occasionally as below:

could not connect to server: Connection timed out    Is the server running on host "DB" and accepting        TCP/IP connections on port 5432?

 

This my code:

 

                  conn = PQsetdbLogin(host, NULL, NULL, NULL, database, username, "") ;

                if (PQstatus (conn) != CONNECTION_BAD){

                PQexec(conn, "BEGIN");

                if (lo_export(conn,oidImage_Data,chImageName) == -1) {

                    printf("PQSTATUS=%s \n",PQerrorMessage(conn));

                    PQfinish (conn) ;

                    printf("EXPORT %s ERROR! SQL STATE =   %s\n ",chImageName,sqlca.sqlstate);

                }

                printf("PQSTATUS=%s \n",PQstatus(conn));

                PQexec(conn, "COMMIT");

 

This log was found in postgres.log:

Oct 18 10:44:35 SUC02 postgres[10159]: [7-1] LOG:  database system is ready

Oct 18 10:44:35 SUC02 postgres[10159]: [8-1] LOG:  transaction ID wrap limit is 3343152371, limited by database "template1"

Oct 18 10:46:11 SUC02 postgres[10997]: [2-1] LOG:  unexpected EOF on client connection

Oct 18 10:46:11 SUC02 postgres[15899]: [2-1] LOG:  could not receive data from client: Connection reset by peer

Oct 18 10:46:11 SUC02 postgres[15899]: [3-1] LOG:  unexpected EOF on client connection

 

What is the problem ? What should I investigate ?

Please help ! Thank you very much !

 

Ray Huang

2009-10-20

 

 

В списке pgsql-general по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Un successful Restoration of DATA using WAL files
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: About could not connect to server: Connection timed out