Thread: Tons of postgres.exe processes
Hi, so I installed native 8.03 on my XP SP2 box - just for testing, I need only support for about 3-4 simult. connections. However I installed it and open the Task manager - and see at least a hundred instances of postgres.exe process in there... And I can't find a way to remedy this. I have no running connections so technically it's redundant to have that amount of processes. Also I started experiening apps failing to start, show menus or init other controls properly when running postgres. Otherwise I could connect with the GUI admin and make a db and a table in it... Please help me resolve this. Regards, Stan Vassilev | Web & Multimedia Developer
> Hi, so I installed native 8.03 on my XP SP2 box - just for > testing, I need only support for about 3-4 simult. connections. > > However I installed it and open the Task manager - and see at > least a hundred instances of postgres.exe process in there... > And I can't find a way to remedy this. I have no running > connections so technically it's redundant to have that amount > of processes. That's certainly not supposed to happen. What kind of application are you using? Are you 100% sure that it actually closes the connections as it should? The situation sounds a bit like a runaway connection pooling or such thing... If you run a "SELECT * FROM pg_stat_activity" query, does it show up all the processes as active backends? > Also I started experiening apps failing to start, show menus > or init other controls properly when running postgres. > Otherwise I could connect with the GUI admin and make a db > and a table in it... That would be the classic symptoms of a windows system running out of memory... //Magnus
>> Hi, so I installed native 8.03 on my XP SP2 box - just for >> testing, I need only support for about 3-4 simult. connections. >> >> However I installed it and open the Task manager - and see at >> least a hundred instances of postgres.exe process in there... >> And I can't find a way to remedy this. I have no running >> connections so technically it's redundant to have that amount >> of processes. > >That's certainly not supposed to happen. > >What kind of application are you using? Are you 100% sure that it >actually closes the connections as it should? The situation sounds a bit >like a runaway connection pooling or such thing... > >If you run a "SELECT * FROM pg_stat_activity" query, does it show up all >the processes as active backends? no idea, psql doesn't want to accept my password... while pgAdmin connects fine with the same.... no idea what's going on anymore. can I run sql query from pgadmin? how? > >> Also I started experiening apps failing to start, show menus >> or init other controls properly when running postgres. >> Otherwise I could connect with the GUI admin and make a db >> and a table in it... > >That would be the classic symptoms of a windows system running out of >memory... The processes appear to take 60kb RAM (most), and I don't have anything taking a lot of RAM (I have 1GB ram). So I guess an x-file again :(
Stan Vassilev wrote: >>> Hi, so I installed native 8.03 on my XP SP2 box - just for >>> testing, I need only support for about 3-4 simult. connections. >>> >>> However I installed it and open the Task manager - and see at >>> least a hundred instances of postgres.exe process in there... >>> And I can't find a way to remedy this. I have no running >>> connections so technically it's redundant to have that amount >>> of processes. >> >> >> That's certainly not supposed to happen. >> >> What kind of application are you using? Are you 100% sure that it >> actually closes the connections as it should? The situation sounds a bit >> like a runaway connection pooling or such thing... >> >> If you run a "SELECT * FROM pg_stat_activity" query, does it show up all >> the processes as active backends? > > > no idea, psql doesn't want to accept my password... while pgAdmin > connects fine with the same.... no idea what's going on anymore. can I > run sql query from pgadmin? how? > >> >>> Also I started experiening apps failing to start, show menus >>> or init other controls properly when running postgres. >>> Otherwise I could connect with the GUI admin and make a db >>> and a table in it... >> >> >> That would be the classic symptoms of a windows system running out of >> memory... > > > The processes appear to take 60kb RAM (most), and I don't have > anything taking a lot of RAM (I have 1GB ram). So I guess an x-file > again :( Is there any way that you might have 2 postgresql processes running? Say one cygwin process and one win32? Just curious. That might explain why psql is not letting you connect, because it is trying to connect to a different one. Anyway, for pgAdmin, there is a button that looks like a pencil which lets you execute arbitrary SQL requests. Or it should be under "Tools/Query Tool" if you want it from the menu. John =:->
Attachment
> The processes appear to take 60kb RAM (most), and I don't have anything > taking a lot of RAM (I have 1GB ram). So I guess an x-file again :( > You can run your system out of GDI handles. If this happens, throw up taskmgr (ctrl-alt-esc) and start killing handle heavy processes (start with pgAdmin) and things should free up. The server proper does not use them so the problems could be unrelated. Certain apps, especially 32 bit apps written in vb, Delphi, or wx, tend to suck down gdi handles. Merlin
Andreas wrote: > Merlin Moncure wrote: > >You can run your system out of GDI handles. If this happens, throw up > >taskmgr (ctrl-alt-esc) and start killing handle heavy processes (start > >with pgAdmin) > > > Strange suggestion. pgAdmin uses many GDI objects, but not extraordinary > compared to available resources. There are no indications that they are > not freed after usage, e.g. closing a property dialog (if you know more, > tell us). Win32 is designed to handle thousands of GDI handles, you'll > have to try hard to hit 1000 with pgadmin. It depends how you use it. This used to happen all the time on non NT versions of windows which had a low GDI handle space, like 32k or 64k. Windows NT kernel has much more, I think around 1mb although I really have no idea. GDI development kits tend to use extra handles because they don't re-acquire handles for the DC, Brush, etc. Delphi is notorious for this. No doubt, you would have to have a lot of pgAdmin windows open for this to happen, like 30 or more or some random number depending on what else is open. Certain well known apps use a lot of handles like Microsoft Visio. I only mentioned it because the behavior you get in this scenario sounds like what was happening to this guy. Merlin