Обсуждение: Connection problem
I get a lot of Error server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. and I think I need some help finding out what is the problem. Any suggestions on where to start? I think I have maximum logging on (debug5) but prior to the crash I get no log. I connect to the server with php/apache and I use pg_pconnect to get persistent connections. The first log message for a working request to the server says: LOG: 00000: connection received: host=[local] LOCATION: BackendInitialize, postmaster.c:2755 DEBUG: 00000: forked new backend, pid=6961 socket=8 LOCATION: BackendStartup, postmaster.c:2581 DEBUG: 00000: received password packet LOCATION: recv_password_packet, auth.c:940 LOG: 00000: connection authorized: user=myuser database=mydb LOCATION: BackendInitialize, postmaster.c:2825 DEBUG: 00000: postmaster child[6961]: starting with ( LOCATION: BackendRun, postmaster.c:2925 DEBUG: 00000: postgres LOCATION: BackendRun, postmaster.c:2928 DEBUG: 00000: -v196608 LOCATION: BackendRun, postmaster.c:2928 DEBUG: 00000: -y LOCATION: BackendRun, postmaster.c:2928 DEBUG: 00000: mydb LOCATION: BackendRun, postmaster.c:2928 DEBUG: 00000: ) LOCATION: BackendRun, postmaster.c:2930 DEBUG: 00000: InitPostgres LOCATION: PostgresMain, postgres.c:3142 DEBUG: 00000: StartTransaction LOCATION: ShowTransactionState, xact.c:4001 DEBUG: 00000: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 8513010/1/0, nestlvl: 1, children: <> LOCATION: ShowTransactionStateRec, xact.c:4026 DEBUG: 00000: CommitTransaction LOCATION: ShowTransactionState, xact.c:4001 DEBUG: 00000: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 8513010/1/0, nestlvl: 1, children: <> LOCATION: ShowTransactionStateRec, xact.c:4026 DEBUG: 00000: StartTransactionCommand LOCATION: start_xact_command, postgres.c:2200 STATEMENT: SELECT count(*) FROM Users DEBUG: 00000: StartTransaction LOCATION: ShowTransactionState, xact.c:4001
Do you have any core dump? Stack trace should help.
Zdenek
A B napsal(a):
> I get a lot of
> Error server closed the connection unexpectedly This probably means
> the server terminated abnormally before or while processing the
> request.
>
> and I think I need some help finding out what is the problem. Any
> suggestions on where to start? I think I have maximum logging on
> (debug5) but prior to the crash I get no log. I connect to the server
> with php/apache and I use pg_pconnect to get persistent connections.
>
> The first log message for a working request to the server says:
>
> LOG: 00000: connection received: host=[local]
> LOCATION: BackendInitialize, postmaster.c:2755
> DEBUG: 00000: forked new backend, pid=6961 socket=8
> LOCATION: BackendStartup, postmaster.c:2581
> DEBUG: 00000: received password packet
> LOCATION: recv_password_packet, auth.c:940
> LOG: 00000: connection authorized: user=myuser database=mydb
> LOCATION: BackendInitialize, postmaster.c:2825
> DEBUG: 00000: postmaster child[6961]: starting with (
> LOCATION: BackendRun, postmaster.c:2925
> DEBUG: 00000: postgres
> LOCATION: BackendRun, postmaster.c:2928
> DEBUG: 00000: -v196608
> LOCATION: BackendRun, postmaster.c:2928
> DEBUG: 00000: -y
> LOCATION: BackendRun, postmaster.c:2928
> DEBUG: 00000: mydb
> LOCATION: BackendRun, postmaster.c:2928
> DEBUG: 00000: )
> LOCATION: BackendRun, postmaster.c:2930
> DEBUG: 00000: InitPostgres
> LOCATION: PostgresMain, postgres.c:3142
> DEBUG: 00000: StartTransaction
> LOCATION: ShowTransactionState, xact.c:4001
> DEBUG: 00000: name: unnamed; blockState: DEFAULT; state:
> INPROGR, xid/subid/cid: 8513010/1/0, nestlvl: 1, children: <>
> LOCATION: ShowTransactionStateRec, xact.c:4026
> DEBUG: 00000: CommitTransaction
> LOCATION: ShowTransactionState, xact.c:4001
> DEBUG: 00000: name: unnamed; blockState: STARTED; state:
> INPROGR, xid/subid/cid: 8513010/1/0, nestlvl: 1, children: <>
> LOCATION: ShowTransactionStateRec, xact.c:4026
> DEBUG: 00000: StartTransactionCommand
> LOCATION: start_xact_command, postgres.c:2200
> STATEMENT: SELECT count(*) FROM Users
> DEBUG: 00000: StartTransaction
> LOCATION: ShowTransactionState, xact.c:4001
>
I have not found any core dumps. The server seems not to stop completely but continue to run. 2008/5/30 Zdenek Kotala <Zdenek.Kotala@sun.com>: > Do you have any core dump? Stack trace should help. > > Zdenek > > A B napsal(a): >> >> I get a lot of >> Error server closed the connection unexpectedly This probably means >> the server terminated abnormally before or while processing the >> request. >> >> and I think I need some help finding out what is the problem. Any >> suggestions on where to start? I think I have maximum logging on >> (debug5) but prior to the crash I get no log. I connect to the server >> with php/apache and I use pg_pconnect to get persistent connections. >> >> The first log message for a working request to the server says: >> >> LOG: 00000: connection received: host=[local] >> LOCATION: BackendInitialize, postmaster.c:2755 >> DEBUG: 00000: forked new backend, pid=6961 socket=8 >> LOCATION: BackendStartup, postmaster.c:2581 >> DEBUG: 00000: received password packet >> LOCATION: recv_password_packet, auth.c:940 >> LOG: 00000: connection authorized: user=myuser database=mydb >> LOCATION: BackendInitialize, postmaster.c:2825 >> DEBUG: 00000: postmaster child[6961]: starting with ( >> LOCATION: BackendRun, postmaster.c:2925 >> DEBUG: 00000: postgres >> LOCATION: BackendRun, postmaster.c:2928 >> DEBUG: 00000: -v196608 >> LOCATION: BackendRun, postmaster.c:2928 >> DEBUG: 00000: -y >> LOCATION: BackendRun, postmaster.c:2928 >> DEBUG: 00000: mydb >> LOCATION: BackendRun, postmaster.c:2928 >> DEBUG: 00000: ) >> LOCATION: BackendRun, postmaster.c:2930 >> DEBUG: 00000: InitPostgres >> LOCATION: PostgresMain, postgres.c:3142 >> DEBUG: 00000: StartTransaction >> LOCATION: ShowTransactionState, xact.c:4001 >> DEBUG: 00000: name: unnamed; blockState: DEFAULT; state: >> INPROGR, xid/subid/cid: 8513010/1/0, nestlvl: 1, children: <> >> LOCATION: ShowTransactionStateRec, xact.c:4026 >> DEBUG: 00000: CommitTransaction >> LOCATION: ShowTransactionState, xact.c:4001 >> DEBUG: 00000: name: unnamed; blockState: STARTED; state: >> INPROGR, xid/subid/cid: 8513010/1/0, nestlvl: 1, children: <> >> LOCATION: ShowTransactionStateRec, xact.c:4026 >> DEBUG: 00000: StartTransactionCommand >> LOCATION: start_xact_command, postgres.c:2200 >> STATEMENT: SELECT count(*) FROM Users >> DEBUG: 00000: StartTransaction >> LOCATION: ShowTransactionState, xact.c:4001 >> > >