During this in htop i see a lot (200 - 300) of connections in state "startup", each of them eats 3-3% of CPU time. This processes are not visible in pg_stat_activity so i cant understand what they are doing, and i cant kill them. I cant see the bottleneck in Disk IO to. The logs of postgres says nothing to. I am confused.....
What can be the cause of huge amount of "startup" connections....
Maybe its better to start use connection pooler such as pgbouncer?
Thanks a lot.
What is your max_connections? Can you ran "perf top" ? What is there.
Too high number can enforce system overloading. You cannot to see these connections in pg_stat_activity because the process in this state isn't fully initialized.
There was lot of bugfix releases after 9.1.2 - currently there is PostgreSQL 9.2.19. Try to upgrade first.