Re: Debugging infrequent pegged out CPU usage

Поиск
Список
Период
Сортировка
От Chris
Тема Re: Debugging infrequent pegged out CPU usage
Дата
Msg-id 490F83C9.9040208@gmail.com
обсуждение исходный текст
Ответ на Re: Debugging infrequent pegged out CPU usage  (Jason Long <mailing.list@supernovasoftware.com>)
Список pgsql-general
Jason Long wrote:
> Scott Marlowe wrote:
>> On Mon, Nov 3, 2008 at 12:25 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
>>
>>> On Mon, Nov 3, 2008 at 11:30 AM, Jason Long
>>> <mailing.list@supernovasoftware.com> wrote:
>>>
>>>> I am running PostgreSQL 8.3.4 on Centos 5.2 with a single Xeon 5472, 1600
>>>> MHz, 12 MB cache, 3.0 GHz quad core, and 4 GB RAM.
>>>>
>>>> My database is only about 50 MB and there are only about 20 users.
>>>>
>>>> For some reason Postgres is pegging my CPU and I can barely log on to reboot
>>>> the machine.  After reboot all is well for another week or so, but this
>>>> brings the system to a grinding halt.
>>>>
>>>> What is the best way to debug this?
>>>> Can I limit Postgres to a certain number of cores or set the timeout on the
>>>> queries to a lower value?
>>>>
> How about preventing this lockup by limiting CPU resources to Postgres
> or giving up if a query takes too long?  I am barely able to log in let
> alone poke around.

You can't limit cpu usage but you can set timeouts.

See statement_timeout here:

http://www.postgresql.org/docs/8.3/interactive/runtime-config.html

Set up your logging.

Even if you do have to reboot, you can at least go back through the logs
to find out what happened just before the reboot.

--
Postgresql & php tutorials
http://www.designmagick.com/


В списке pgsql-general по дате отправления:

Предыдущее
От: "Diego Schulz"
Дата:
Сообщение: Re: INSERT with RETURNING clause inside SQL function
Следующее
От: Scott Ribe
Дата:
Сообщение: Re: Are there plans to add data compression feature to postgresql?