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?
 
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.
0
 
gheistCommented:
Is any firewall or virus software involved???
0
 
wajszleAuthor Commented:
Neither firewall, nor antyvirus.
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
gheistCommented:
Is port 5432 oprn on server when looking at "netstat -an" ???
0
 
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?
0
 
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.
0
 
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
0
 
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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.