Link to home
Start Free TrialLog in
Avatar of wajszle
wajszle

asked on

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.
Avatar of gheist
gheist
Flag of Belgium image

Is any firewall or virus software involved???
Avatar of wajszle
wajszle

ASKER

Neither firewall, nor antyvirus.
Is port 5432 oprn on server when looking at "netstat -an" ???
Avatar of wajszle

ASKER

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?
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.
Avatar of wajszle

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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