473,774 Members | 2,206 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

process hangs using perl?

Running a perl script against my dev server (pg 7.3.4) that currently runs
fine on the production server. And for some reason Pg always seems to hang
during the process (see below for Top print out). This happens randomily
throughout the script and can be on a SELECT, INSERT, or UPDATE statement,
but doesn't cause the Pg server to go down (which is good). Any
suggestions on where to start looking?

Perl version 5.6.1


---Top print out

4:08pm up 23 days, 4:46, 3 users, load average: 1.00, 1.05, 1.39
78 processes: 75 sleeping, 2 running, 1 zombie, 0 stopped
CPU0 states: 30.4% user, 4.0% system, 0.0% nice, 64.4% idle
CPU1 states: 47.0% user, 3.3% system, 0.0% nice, 49.0% idle
Mem: 513640K av, 505332K used, 8308K free, 0K shrd, 13176K
buff
Swap: 2044056K av, 48624K used, 1995432K free 356028K
cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
16094 postgres 14 0 98.8M 97M 18900 R 85.2 19.4 31:38 postgres:
phatcher mdc_oz [local] SELECT
16655 postgres 9 0 1052 1052 836 R 0.1 0.2 0:00 top
14397 postgres 8 0 1964 1840 1708 S 0.0 0.3 0:00
/usr/local/postgresql7.3.4/bin/postmaster
14398 postgres 9 0 2932 2780 1700 S 0.0 0.5 0:03 postgres:
stats buffer process
14399 postgres 9 0 2168 2016 1704 S 0.0 0.3 0:05 postgres:
stats collector process
16074 postgres 9 0 23836 20M 18884 S 0.0 4.1 16:24 postgres:
phatcher mdc_oz [local] SELECT waiting
16076 postgres 9 0 21792 20M 18916 S 0.0 4.1 644:42 postgres:
phatcher mdc_oz [local] SELECT waiting
16546 postgres 9 0 17988 16M 17208 S 0.0 3.3 0:11 postgres:
phatcher mdc_oz [local] SELECT waiting
16650 postgres 9 0 1332 1332 1060 S 0.0 0.2 0:00 /bin/bash
TIA

Patrick Hatcher

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #1
2 2627
""Patrick Hatcher"" <PH******@macys .com> wrote in message
news:OF******** *************** *************** *************** **@fds.com...
Running a perl script against my dev server (pg 7.3.4) that currently runs
fine on the production server. And for some reason Pg always seems to hang during the process (see below for Top print out). This happens randomily
throughout the script and can be on a SELECT, INSERT, or UPDATE statement, but doesn't cause the Pg server to go down (which is good). Any
suggestions on where to start looking?

Perl version 5.6.1


---Top print out

4:08pm up 23 days, 4:46, 3 users, load average: 1.00, 1.05, 1.39
78 processes: 75 sleeping, 2 running, 1 zombie, 0 stopped
CPU0 states: 30.4% user, 4.0% system, 0.0% nice, 64.4% idle
CPU1 states: 47.0% user, 3.3% system, 0.0% nice, 49.0% idle
Mem: 513640K av, 505332K used, 8308K free, 0K shrd, 13176K
buff
Swap: 2044056K av, 48624K used, 1995432K free 356028K
cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
16094 postgres 14 0 98.8M 97M 18900 R 85.2 19.4 31:38 postgres:
phatcher mdc_oz [local] SELECT
16655 postgres 9 0 1052 1052 836 R 0.1 0.2 0:00 top
14397 postgres 8 0 1964 1840 1708 S 0.0 0.3 0:00
/usr/local/postgresql7.3.4/bin/postmaster
14398 postgres 9 0 2932 2780 1700 S 0.0 0.5 0:03 postgres:
stats buffer process
14399 postgres 9 0 2168 2016 1704 S 0.0 0.3 0:05 postgres:
stats collector process
16074 postgres 9 0 23836 20M 18884 S 0.0 4.1 16:24 postgres:
phatcher mdc_oz [local] SELECT waiting
16076 postgres 9 0 21792 20M 18916 S 0.0 4.1 644:42 postgres:
phatcher mdc_oz [local] SELECT waiting
16546 postgres 9 0 17988 16M 17208 S 0.0 3.3 0:11 postgres:
phatcher mdc_oz [local] SELECT waiting
16650 postgres 9 0 1332 1332 1060 S 0.0 0.2 0:00 /bin/bash
TIA

Patrick Hatcher

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Looks to me like you probably have a bad SELECT holding up all of the
others... Any chance its a "SELECT .. FOR UPDATE ??? that's hung and you
have a transaction open ? That'll cause everything else to wait...


--
Greg Patnude / The Digital Demention
2916 East Upper Hayden Lake Road
Hayden Lake, ID 83835
(208) 762-0762

Nov 12 '05 #2
Patrick,

Can you provide the code (or at least the relevant parts) for us to look at?
Quoting Patrick Hatcher <PH******@macys .com>:
Running a perl script against my dev server (pg 7.3.4) that currently runs
fine on the production server. And for some reason Pg always seems to hang
during the process (see below for Top print out). This happens randomily
throughout the script and can be on a SELECT, INSERT, or UPDATE statement,
but doesn't cause the Pg server to go down (which is good). Any
suggestions on where to start looking?

Perl version 5.6.1


---Top print out

4:08pm up 23 days, 4:46, 3 users, load average: 1.00, 1.05, 1.39
78 processes: 75 sleeping, 2 running, 1 zombie, 0 stopped
CPU0 states: 30.4% user, 4.0% system, 0.0% nice, 64.4% idle
CPU1 states: 47.0% user, 3.3% system, 0.0% nice, 49.0% idle
Mem: 513640K av, 505332K used, 8308K free, 0K shrd, 13176K
buff
Swap: 2044056K av, 48624K used, 1995432K free 356028K
cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
16094 postgres 14 0 98.8M 97M 18900 R 85.2 19.4 31:38 postgres:
phatcher mdc_oz [local] SELECT
16655 postgres 9 0 1052 1052 836 R 0.1 0.2 0:00 top
14397 postgres 8 0 1964 1840 1708 S 0.0 0.3 0:00
/usr/local/postgresql7.3.4/bin/postmaster
14398 postgres 9 0 2932 2780 1700 S 0.0 0.5 0:03 postgres:
stats buffer process
14399 postgres 9 0 2168 2016 1704 S 0.0 0.3 0:05 postgres:
stats collector process
16074 postgres 9 0 23836 20M 18884 S 0.0 4.1 16:24 postgres:
phatcher mdc_oz [local] SELECT waiting
16076 postgres 9 0 21792 20M 18916 S 0.0 4.1 644:42 postgres:
phatcher mdc_oz [local] SELECT waiting
16546 postgres 9 0 17988 16M 17208 S 0.0 3.3 0:11 postgres:
phatcher mdc_oz [local] SELECT waiting
16650 postgres 9 0 1332 1332 1060 S 0.0 0.2 0:00 /bin/bash
TIA

Patrick Hatcher

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

--
Keith C. Perry
Director of Networks & Applications
VCSN, Inc.
http://vcsn.com

_______________ _______________ ______
This email account is being host by:
VCSN, Inc : http://vcsn.com

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4995
by: RL | last post by:
Hello Perl gurus, 1. I have a web page where I can push a button (dospawn.html). 2. This button calls a CGI script (spawnboss.cgi) 3. spawnboss.cgi calls a forking perl script (forkme.pl) 4. forkme.pl calls the process creation script (createme.pl) 5. createme.pl creates my notepad.exe process, but no window shows up on my PC. The result on my web browser is:
0
5140
by: rtm | last post by:
I am interested in running a process with a timeout. Also I'm interested in analyzing the output of this process. Under Unix, the solution is described clearly in the Perl Cookbook "16.10: Communicating between related processes" and 16.24 "Timing out an Operation". Enclosed below is an example showing what I want to do under Unix. I need to do this under Windows XP. As others have pointed out "alarm" works under 5.8+ and fork...
5
1732
by: Scott | last post by:
So I can't figure out how to Google for this problem, I'll try asking for a solution here. Whenever I deploy changes, whether they are changed code-behind DLL's or ASPX/ASCX/ASAX pages to my staging and production web servers the process hangs. I'm guessing it's during the JIT compilation because if the process DOESN'T hang, the problem never occurs after the first time you hit the web application.
11
13463
by: Kirk | last post by:
The following C# web service works fine until you uncomment the lines setting UserName and Password. Then the process starts as the specified user, but hangs in a suspended state. In fact, any executable will exhibit this problem; it is not specific to whoami.exe. This is with .NET 2.0, of course (1.1 does not support running a process as a different user). This appears to be a bug. Can anyone comment? <%@ WebService Language="C#"...
6
3386
by: Alexander Widera | last post by:
hello, if i start a program (an exe-file) with Process.Start(...) I don't have the required permissions that the programm needs (i could start the programm but the program needs special rights). So I added the StartInfo.UserName and Password to the Process. Now the program starts, but it hangs... nothing happens. In the task-manager the process is created, but it doesn't do anything - no cpu-load and no change of memory-usage. What...
4
4102
by: Podi | last post by:
Hi, I am using Python 2.4.4 on Windows XP SP2. I am trying to start a process (infinite loop application) in the background and I've tried several options and none of them seem to work. Any help would be much appreciated.
2
6880
by: test3 | last post by:
Hello folks, I'm using System.Diagnostics.Process to start a thirdparty program (that works perfectly when started via command line). I'm using Process.StandardOutput to get the output of the program. That works for 95 %, but the other 5 % it doesn't. It seems to me that the started process just hangs, and therefor my program hangs, too (p.WaitForExit()). I researched that this only happens when the output of the program is longer than...
5
3304
by: Saya | last post by:
Hi Folks, I have now spend app. 3 days to get the below scenario to work, but can not get there! ..Net version = 2.0.50727 Windows version = Microsoft Windows = Windows Server 2003 Now I have to develop a webservice which is run on the server. The
7
6237
by: Samuel A. Falvo II | last post by:
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke this shell script using the Subprocess module. Here is my code: def resultFromRunning_(command):
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10040
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8939
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.