Thread: Postgres timeouts?

Postgres timeouts?

From
bweishoff@charter.net
Date:
   I'm having an interesting issue with PGSQL.   It seems that I'm experiencing timeouts at various times.   The servers are not busy and have plenty of resources.  The databases are ~50GB in size, the systems typically have 8-12GB physical RAM, and the connections are low (less than 15 at any given time). 

The issue I'm seeing is that randomly I'm getting these pauses, or stalls, while trying to simply connect to the database server(s) from connected clients using the psql command line client.  I cannot tell if the server is even getting the request for service as they don't seem to show up in the logs at the time the event is occurring, so I'm thinking it's maybe a client-side issue. 

Is there a good general starting place for debugging these types of issues ?


-B.

Re: Postgres timeouts?

From
Kevin Grittner
Date:
"bweishoff@charter.net" <bweishoff@charter.net> wrote:

> I'm having an interesting issue with PGSQL.   It seems that I'm
> experiencing timeouts at various times.   The servers are not
> busy and have plenty of resources.  The databases are ~50GB in
> size, the systems typically have 8-12GB physical RAM, and the
> connections are low (less than 15 at any given time).
>
> The issue I'm seeing is that randomly I'm getting these pauses,
> or stalls, while trying to simply connect to the database
> server(s) from connected clients using the psql command line
> client.  I cannot tell if the server is even getting the request
> for service as they don't seem to show up in the logs at the time
> the event is occurring, so I'm thinking it's maybe a client-side
> issue.
>
> Is there a good general starting place for debugging these types
> of issues ?

You didn't give much detail to narrow the possible causes.  You
might want to read this before posting again:

http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

That said, I have seen a lot of people reporting similar problems
on Linux lately due to Transparent Huge Page (THP) defragmentation.
If you are running on Linux and you see high system CPU time during
an episode, the odds are high that this is the cause.  Details of
how to deal with it vary among distributions.  I have sometimes
seen people try to deal with this by disabling THP defrag, but in
those cases I have always seen them go back and totally disable THP
support.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company