Calling PostgreSQL Experts

I have a pretty decent server - Dual Xeon 2.8 with 3GB RAM.

I use it to run two sites based on PGSQL. Current load is always around 0.1 or less.

However, sometimes I get the following error:

Unable to connect to PostgreSQL server: FATAL: sorry, too many clients already
My postgresql.conf currently has:

max_connections = 300

...

# - Memory -

shared_buffers = 183500 # min 16 or max_connections*2, 8KB each
temp_buffers = 80000 # min 100, 8KB each
#max_prepared_transactions = 5 # can be 0 or more
# note: increasing max_prepared_transactions costs ~600 bytes of shared memory
# per transaction slot, plus lock space (see max_locks_per_transaction).
#work_mem = 1024 # min 64, size in KB
#maintenance_work_mem = 16384 # min 1024, size in KB
#max_stack_depth = 2048 # min 100, size in KB

# - Free Space Map -

#max_fsm_pages = 20000 # min max_fsm_relations*16, 6 bytes each
#max_fsm_relations = 1000 # min 100, ~70 bytes each

# - Kernel Resource Usage -

#max_files_per_process = 1000 # min 25
#preload_libraries = ''
I am positive all this shouldnt be happening with 3GB RAM - how can I optimize the PGSQL install better to make use of the 3GB?

 

 

 

 

Top