I need some advice on how to get Postgres to stop crashing. It crashes
consistantly under high server load. I don't want to sound bitchy, but
that's just what has been happening lately.
now i'll give you a spec on the system:
Red Hat Linux 5.2 (kernel 2.0.36)
400Mhz Intel machine with 384 RAM
Lots of hard drive space (doesn't matter anyway)
PostgreSQL 6.5.3
The following are log outputs from right after a crash. This is how I
started Postgres (from an init.d file):
su postgres -l -c '/usr/bin/postmaster -i > /var/lib/pgsql /pgserver.log
2>&1' &
Here's some log output ('tail'd):
ERROR: parser: parse error at or near ""
ERROR: parser: parse error at or near ""
ERROR: parser: parse error at or near ""
ERROR: parser: parse error at or near ""
ERROR: parser: parse error at or near ""
ERROR: parser: parse error at or near ""
ERROR: parser: parse error at or near ""
ERROR: parser: parse error at or near ""
ERROR: parser: parse error at or near ""
FATAL 1: ReleaseLruFile: No opened files - no one can be closed
Another time:
FATAL 1: Memory exhausted in AllocSetAlloc()
NOTICE: AbortTransaction and not in in-progress state
FATAL 1: Memory exhausted in AllocSetAlloc()
FATAL 1: Memory exhausted in AllocSetAlloc()
FATAL 1: Memory exhausted in AllocSetAlloc()
FATAL 1: Memory exhausted in AllocSetAlloc()
out of dynamic memory in yy_create_buffer()
FATAL 1: Memory exhausted in AllocSetAlloc()
FATAL 1: Memory exhausted in AllocSetAlloc()
FATAL 1: Memory exhausted in AllocSetAlloc()
After these, I changed the way I started Postgres (increased buffers,
etc...):
su postgres -l -c '/usr/bin/postmaster -i -B 256 -N 128 >
/var/lib/pgsql/pgserver.log 2>&1' &
But there are still crashes, so here's the output from the last crash:
pq_flush: send() failed: Broken pipe
FATAL: pq_endmessage failed: errno=32
pq_flush: send() failed: Broken pipe
FATAL: pq_endmessage failed: errno=32
pq_flush: send() failed: Broken pipe
FATAL: pq_endmessage failed: errno=32
pq_flush: send() failed: Broken pipe
FATAL: pq_endmessage failed: errno=32
pq_flush: send() failed: Broken pipe
pq_recvbuf: unexpected EOF on client connection
And another time:
ERROR: parser: parse error at or near ""
ERROR: parser: parse error at or near ""
ERROR: parser: parse error at or near ""
ERROR: parser: parse error at or near ""
FATAL 1: Database system does not exist. PGDATA directory
'/var/lib/pgsql' not found.
Normally, you create a database system by running initdb.
FATAL 1: ReleaseLruFile: No opened files - no one can be closed
pq_recvbuf: unexpected EOF on client connection
pq_flush: send() failed: Broken pipe
pq_recvbuf: unexpected EOF on client connection
Now the fact that PGDATA doesn't exist is REALLY weird, because it's
there and has been there for months. I'm guessing Postgres didn't have
the resources to read the file system at the time.
Anyway, any insight into this would be MUCH appreciated! Thanks guys!
--
Garry Dolley
Webmaster/Technical Contact
LinuxStart.Com