?
Solved

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

Posted on 2006-04-13
9
Medium Priority
?
5,553 Views
Last Modified: 2012-05-05
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.
0
Comment
Question by:wajszle
  • 5
  • 3
8 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 16456866
Is any firewall or virus software involved???
0
 

Author Comment

by:wajszle
ID: 16523282
Neither firewall, nor antyvirus.
0
 
LVL 62

Expert Comment

by:gheist
ID: 16524409
Is port 5432 oprn on server when looking at "netstat -an" ???
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 

Author Comment

by:wajszle
ID: 16524617
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
 
LVL 62

Expert Comment

by:gheist
ID: 16527886
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
 

Author Comment

by:wajszle
ID: 16532570
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
 
LVL 62

Accepted Solution

by:
gheist earned 1000 total points
ID: 16533372
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
 
LVL 62

Expert Comment

by:gheist
ID: 16811602
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: http://www.postgresql.org/ (http://www.postgresql.org/) This requires some add-o…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question