Re: Server stops responding randomly for 5 minutes

From: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Server stops responding randomly for 5 minutes
Date: 2011-07-13 11:56:44
Message-ID: 8ca725a49ad12886428e7c5d02410c8d.squirrel@sq.gransy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 13 Červenec 2011, 13:34, Andrus wrote:
> 2011-07-11 12:18:35 EEST LOG: unexpected EOF on client connection
> 2011-07-11 12:18:46 EEST LOG: could not receive data from client: No
> connection could be made because the target machine actively refused it.
>
>
> 2011-07-11 12:18:46 EEST LOG: unexpected EOF on client connection
> 2011-07-11 12:20:55 EEST LOG: could not receive data from client: No
> connection could be made because the target machine actively refused it.

AFAIK this happens when the connection is not closed properly (e.g. the
application exits without closing the connection etc.).

>> First, you have to determine what's wrong. Set up some basic monitoring,
>> on Linux I'd use iostat/vmstat, not sure about the windows - try process
>> explorer from sysinternals.
>
> Users report hangup later, I cannot monitor this at hangup time.
> No idea what / how to monitor more. Anyway I added lines
>
> log_lock_waits = on
> log_temp_files = 2000
> log_min_duration_statement = 10000
> log_line_prefix='%t %u %d '
> log_min_error_statement = warning

OK, but you need to monitor the system too. See for example the Process
Explorer - you can run it and then see the history when the users report
there was a problem.

> I ran now EnterpiseDb Tuning wizard and optimized postgresql.conf using it
> for mixed app server and restarted service.

> shared_buffers = 69608 # min 128kB

OK, that's 540MB - pretty close to 512MB I have recommended.

Tomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Howard Cole 2011-07-13 12:18:41 Re: About permissions on large objects
Previous Message Andrus 2011-07-13 11:56:41 Re: Server stops responding randomly for 5 minutes