could not receive data from client: No connection could be made because the target machine actively refused it.

Here is the fragment of Postgresql 8.1 log - Windows 2003 server installation:
2006-04-13 10:30:33 tvman/tvman(10.0.1.197)LOG:  unexpected EOF on client connection
2006-04-13 10:30:33 tvman/tvman(10.0.1.197)LOG:  could not receive data from client: No connection could be made because the target machine actively refused it.
2006-04-13 10:30:33 tvman/tvman(10.0.1.197)LOG:  unexpected EOF on client connection
2006-04-13 10:32:10 tvman/tvman(10.0.1.116)LOG:  could not receive data from client: No connection could be made because the target machine actively refused it.
2006-04-13 10:32:10 tvman/tvman(10.0.1.116)LOG:  unexpected EOF on client connection
2006-04-13 10:32:10 tvman/tvman(10.0.1.116)LOG:  could not receive data from client: No connection could be made because the target machine actively refused it.

The only tip to solve the problem I found is to restart the database service. Unfortunatelly after a few days the problem appears again? Any help? Since I am not able to check the statistics of the server:
2006-04-13 10:56:23 /()FATAL:  could not read from statistics collector pipe: No error
2006-04-13 10:56:23 /()FATAL:  could not write to statistics collector pipe: No connection could be made because the target machine actively refused it.
I checked the current connections using 'netstat'. It looks that there is 280 connections on port 5432, since I set the limit to 600, it shouldn't be the reason of the problem.

Any help? TIA.
wajszleAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gheistCommented:
Is any firewall or virus software involved???
wajszleAuthor Commented:
Neither firewall, nor antyvirus.
gheistCommented:
Is port 5432 oprn on server when looking at "netstat -an" ???
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

wajszleAuthor Commented:
I didn't write it clear, sorry.
The database server works well - as I wrote, there is about 280 open connections. The communication seams to work fine, but I still see the log items like:

2006-04-24 10:43:35 tvman/tvman(10.0.1.2)LOG:  unexpected EOF on client connection
2006-04-24 10:43:35 tvman/tvman(10.0.1.2)LOG:  could not receive data from client: No connection could be made because the target machine actively refused it.

Once a week the database server stops to respond, or it responds very slow and I have to restart it.

"unexpected EOF on client connection" seams to me like the client didn't close the connection but it does. What is the meaning of those messages?
gheistCommented:
Windows checklist (ask google for detail)
1) enable "DisablePagingExecutive" & reboot
2) increase "MaxUserPort" to maximum - You mentioned 280 open connections - but how much are in TIME_WAIT state? 2800?? & reboot
3) Go to network/sharing and set machine as app server & reboot
4) Make sure you run only HCL drivers & reboot
5) You say you restart once a week - maybe memory leak maybe too much connections for RAM - who knows:

Again - is it 2003 or 2003 SP1?
select version(); ???
Please post lines you customized in postgresql.conf ( omiting hostnames, ip-s and all the stuff you dont want to publish - just changed numbers), I'll try to explain how many bits they use etc etc.
Thank you for not pasting all the config file.
wajszleAuthor Commented:
Platform Windows 2003 SP1
version 'PostgreSQL 8.1.3 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)'

posrgresql.conf:

# - Connection Settings -
listen_addresses = '*'            # what IP address(es) to listen on;
port = 5432
max_connections = 600
# Memory
shared_buffers = 12000                  # min 16 or max_connections*2, 8KB each
#temp_buffers = 1000                  # min 100, 8KB each
#max_prepared_transactions = 5            # can be 0 or more
work_mem = 16384                  # min 64, size in KB
maintenance_work_mem = 65536
max_stack_depth = 8192
# - Free Space Map -
#max_fsm_pages = 20000                  # min max_fsm_relations*16, 6 bytes each
#max_fsm_relations = 1000            # min 100, ~70 bytes each
max_fsm_pages = 150000                  # min max_fsm_relations*16, 6 bytes each

# - Kernel Resource Usage -
#max_files_per_process = 1000            # min 25
# - Statistics Monitoring -

#log_parser_stats = off
#log_planner_stats = off
#log_executor_stats = off
#log_statement_stats = off

# - Query/Index Statistics Collector -

stats_start_collector = on
#stats_command_string = off
#stats_block_level = off
stats_row_level = on
#stats_reset_on_server_start = off
gheistCommented:
2000 shared buffers were fo 40 connections
For 600 connections it looks more like 30000 shared buffers - to prevent weekly solowdown.
i.e 8KB*30000 = 240MB

16M work_mem * 600 = 9600MB maximum when everyone is connected.

Less worm_mem may make it fit into 1G or 4G , more targeted indices will help with resulting lack of performance.

How much ram you do have ?

More and more it looks like some of your clients do not close database connections when done ( examine netstat -an output looking for leaders)

When done fixing immediate problem with clients do evaluate connection pooling libraries for java/php/whatever is connection leader.

Rest looks resonably scaled - about _fsm_ - you have to force vacuum an look into its report if fsm_pages covers enough of deletes your database encounters.

Feel free to ask if something is not absolutely clear.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gheistCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:

accept gheist http:#16533372

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

gheist
EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PostgreSQL

From novice to tech pro — start learning today.