Re: [GENERAL] Huge number of INSERTs

2011-11-20 Thread Tomas Vondra
Dne 20.11.2011 13:46, Phoenix Kiula napsal(a): > On Sun, Nov 20, 2011 at 2:11 PM, Tomas Vondra wrote: > For a moment there, I unleashed the valve and allowed the INSERT > functionality. The log was immediately flooded with this: > > > LOG: duration: 6851.054 ms statement: select nextval('main

Re: [GENERAL] Huge number of INSERTs

2011-11-20 Thread Phoenix Kiula
On Sun, Nov 20, 2011 at 2:11 PM, Tomas Vondra wrote: > Dne 18.11.2011 13:30, Phoenix Kiula napsal(a): >> Full DB:   32GB >> The big table referenced above:  28 GB >> >> It's inserts into this one that are taking time. > > Hm, in that case the shared_buffers is probably too low. It'd be nice to > h

Re: [GENERAL] Huge number of INSERTs

2011-11-19 Thread Tomas Vondra
Dne 18.11.2011 13:30, Phoenix Kiula napsal(a): > Full DB: 32GB > The big table referenced above: 28 GB > > It's inserts into this one that are taking time. Hm, in that case the shared_buffers is probably too low. It'd be nice to have at least the indexes on the table in the buffers, an

Re: [GENERAL] Huge number of INSERTs

2011-11-19 Thread Tomas Vondra
Dne 19.11.2011 23:34, Phoenix Kiula napsal(a): > On Sat, Nov 19, 2011 at 1:29 AM, Steve Crawford > wrote: >> You still didn't answer what "massive traffic" means. > > > Thousands of website hits per minute. (At peak time) > > Average is a few hundred per minute. This is pretty vague descriptio

Re: [GENERAL] Huge number of INSERTs

2011-11-19 Thread Phoenix Kiula
On Sat, Nov 19, 2011 at 1:29 AM, Steve Crawford wrote: > On 11/18/2011 04:30 AM, Phoenix Kiula wrote: >> >> On Fri, Nov 18, 2011 at 9:25 AM, Steve Crawford >>  wrote: >> >> Database only? Or is it also your webserver? >> >> It's my webserver and DB. Webserver is nginx, proxying all PHP >> re

Re: [GENERAL] Huge number of INSERTs

2011-11-19 Thread Tomas Vondra
On 19 Listopad 2011, 20:27, Phoenix Kiula wrote: > On Fri, Nov 18, 2011 at 10:41 AM, Tomas Vondra wrote: >> >> That has nothing to do with the inserts, it means the number of >> connection >> requests exceeds the max_connections. You've set it to 350, and that >> seems >> too high - the processes

Re: [GENERAL] Huge number of INSERTs

2011-11-19 Thread Phoenix Kiula
On Fri, Nov 18, 2011 at 10:41 AM, Tomas Vondra wrote: > > That has nothing to do with the inserts, it means the number of connection > requests exceeds the max_connections. You've set it to 350, and that seems > too high - the processes are going to struggle for resources (CPU, I/O and > memory) a

Re: [GENERAL] Huge number of INSERTs

2011-11-18 Thread Steve Crawford
On 11/18/2011 04:30 AM, Phoenix Kiula wrote: On Fri, Nov 18, 2011 at 9:25 AM, Steve Crawford wrote: Database only? Or is it also your webserver? It's my webserver and DB. Webserver is nginx, proxying all PHP requests to apache in the backend. You still didn't answer what "massive traffic"

Re: [GENERAL] Huge number of INSERTs

2011-11-18 Thread Richard Huxton
On 18/11/11 12:30, Phoenix Kiula wrote: I've currently disabled any INSERT functions on my website...but even with disabled INSERTs and only SELECTs alive, I still see the "psql: FATAL: sorry, too many clients already" message. As Tomas has said, this is nothing to do with inserts and everythi

Re: [GENERAL] Huge number of INSERTs

2011-11-18 Thread Phoenix Kiula
On Fri, Nov 18, 2011 at 9:25 AM, Steve Crawford wrote: >> Database only? Or is it also your webserver? It's my webserver and DB. Webserver is nginx, proxying all PHP requests to apache in the backend. > What version of PostgreSQL? What OS? What OS tuning, if any, have you done? > (Have you i

Re: [GENERAL] Huge number of INSERTs

2011-11-17 Thread Tomas Vondra
Hi, there's a pretty wiki page about tuning PostgreSQL databases: http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server On 18 Listopad 2011, 1:44, Phoenix Kiula wrote: > Hi. I have a massive traffic website. > > I keep getting "FATAL: Sorry, too many clients already" problems. That has n

Re: [GENERAL] Huge number of INSERTs

2011-11-17 Thread Steve Crawford
On 11/17/2011 04:44 PM, Phoenix Kiula wrote: Hi. I have a massive traffic website. "Massive" = what, exactly? I keep getting "FATAL: Sorry, too many clients already" problems. It's a Quad core machine with dual servers, 4 SCSI disks with RAID 10, with RAM of 8GB. Database only? Or is it also

Re: [GENERAL] Huge number of INSERTs

2011-11-17 Thread John R Pierce
On 11/17/11 4:44 PM, Phoenix Kiula wrote: I keep getting "FATAL: Sorry, too many clients already" problems. It's a Quad core machine with dual servers, 4 SCSI disks with RAID 10, with RAM of 8GB. Server is Nginx backed by Apache for the php. Postgresql just has to do about 1000 SELECTs a minut

[GENERAL] Huge number of INSERTs

2011-11-17 Thread Phoenix Kiula
Hi. I have a massive traffic website. I keep getting "FATAL: Sorry, too many clients already" problems. It's a Quad core machine with dual servers, 4 SCSI disks with RAID 10, with RAM of 8GB. Server is Nginx backed by Apache for the php. Postgresql just has to do about 1000 SELECTs a minute, an