RE: Killing a Process

2004-11-24 Thread Fong, Anna
If your Oracle DBA has a resource profile set for your web server user,
you can set parameter IDLE_TIME.
How to create a profile --
http://www.adp-gmbh.ch/ora/sql/create_profile.html



-Original Message-
From: Kevin Bass [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 21, 2004 4:53 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Killing a Process

I have a slight problem that I am attemping to solve. I am using
CGI/Perl (DBD Oracle) on Linux AS 2.1 to access to the database. When
users encounter problems on the web, they cancel (or press stop) in
their browsers. This will stop there browser interaction and also cause
the database connection to not disconnect which causes a runaway
process. Is there an article that I can read or a procedure/module or
process that someone has written within CGI or DBI (or sometimes else)
that will allow me to kill my database connection when a users stops an
execute within his/her browser?  Thanks!

Kevin



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Killing a Process

2004-11-23 Thread dan . horne
In version 7.1 or maybe 7.2 (I can't remember), Oracle introduced a 
SQL*Net  configuration parameter  SQLNET.EXPIRE_TIME, which would check 
that the client was still connected, and if not would tidy up any 
resources, including dangling connections. I don't know if it's still 
supported under the later versions of SQL*Net, but it's something that you 
could look at

Dan





Henri Asseily [EMAIL PROTECTED]
23/11/2004 08:11

 
To: Bob Showalter [EMAIL PROTECTED]
cc: 'Kevin Bass' [EMAIL PROTECTED], [EMAIL PROTECTED], 
[EMAIL PROTECTED], (bcc: Dan Horne/IT/AKLWHG/WHNZ)
Subject:Re: Killing a Process



On Nov 22, 2004, at 5:30 AM, Bob Showalter wrote:

 Kevin Bass wrote:
 I have a slight problem that I am attemping to solve. I am using
 CGI/Perl (DBD Oracle) on Linux AS 2.1 to access to the database. When
 users encounter problems on the web, they cancel (or press stop) in
 their browsers. This will stop there browser interaction and also
 cause the database connection to not disconnect which causes a
 runaway process. Is there an article that I can read or a
 procedure/module or process that someone has written within CGI or
 DBI (or sometimes else) that will allow me to kill my database
 connection when a users stops an execute within his/her browser?
 Thanks!

 When the user presses the Stop button on their browser, the only 
 thing
 that happens is the connection back to the server is closed. The only 
 way
 for your script to detect this is to try to send data back to the 
 client. If
 the connection is closed, you'll receive SIGPIPE (which by default will
 terminate your process).

 You can catch the SIGPIPE and do a graceful shutdown on the db 
 connection.

 If you're in the middle of a query, you won't be able to detect the
 connection being closed until the DBI call returns.


Note that while a plain CGI script might get a SIGPIPE, it won't be the 
case under mod_perl. There are no pipes under mod_perl and I have no 
idea how one would go about knowing if the user severed the connection.






NOTICE
This email and any attachments are confidential. They may contain privileged 
information or copyright material. If you are not an intended recipient, you 
should not read, copy, use or disclose the contents without authorisation as 
we request you contact us as once by return email. Please then delete the 
email and any attachments from your system.  We do not accept liability in 
connection with computer viruses, data corruption, delay, interruption, 
unauthorised access or unauthorised amendment. Any views expressed in this 
email and any attachments do not necessarily reflect the views of the 
company.




Re: Killing a Process

2004-11-22 Thread Tim Bunce
There ought to be a better way. I'm not very familar with web issues
but for plain CGI I'd have expected a SIGHUP and/or SIGPIPE to be
delivered to the process. Those could be caught and trigger cleanup.

Tim.

On Sun, Nov 21, 2004 at 09:12:30AM -0700, Reidy, Ron wrote:
 Look at setting the sqlnet.expire_time parameter in your server's 
 $ORACLE_HOME/network/admin/sqlnet.ora file.

 From: Kevin Bass [mailto:[EMAIL PROTECTED]
 
 I have a slight problem that I am attemping to solve. I am using CGI/Perl
 (DBD Oracle) on Linux AS 2.1 to access to the database. When users encounter
 problems on the web, they cancel (or press stop) in their browsers. This
 will stop there browser interaction and also cause the database connection
 to not disconnect which causes a runaway process. Is there an article that I
 can read or a procedure/module or process that someone has written within
 CGI or DBI (or sometimes else) that will allow me to kill my database
 connection when a users stops an execute within his/her browser?  Thanks!
 
 Kevin

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




RE: Killing a Process

2004-11-22 Thread Bob Showalter
Kevin Bass wrote:
 I have a slight problem that I am attemping to solve. I am using
 CGI/Perl (DBD Oracle) on Linux AS 2.1 to access to the database. When
 users encounter problems on the web, they cancel (or press stop) in
 their browsers. This will stop there browser interaction and also
 cause the database connection to not disconnect which causes a
 runaway process. Is there an article that I can read or a
 procedure/module or process that someone has written within CGI or
 DBI (or sometimes else) that will allow me to kill my database
 connection when a users stops an execute within his/her browser? 
 Thanks!  

When the user presses the Stop button on their browser, the only thing
that happens is the connection back to the server is closed. The only way
for your script to detect this is to try to send data back to the client. If
the connection is closed, you'll receive SIGPIPE (which by default will
terminate your process). 

You can catch the SIGPIPE and do a graceful shutdown on the db connection.

If you're in the middle of a query, you won't be able to detect the
connection being closed until the DBI call returns.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response




Re: Killing a Process

2004-11-22 Thread Henri Asseily
On Nov 22, 2004, at 5:30 AM, Bob Showalter wrote:
Kevin Bass wrote:
I have a slight problem that I am attemping to solve. I am using
CGI/Perl (DBD Oracle) on Linux AS 2.1 to access to the database. When
users encounter problems on the web, they cancel (or press stop) in
their browsers. This will stop there browser interaction and also
cause the database connection to not disconnect which causes a
runaway process. Is there an article that I can read or a
procedure/module or process that someone has written within CGI or
DBI (or sometimes else) that will allow me to kill my database
connection when a users stops an execute within his/her browser?
Thanks!
When the user presses the Stop button on their browser, the only 
thing
that happens is the connection back to the server is closed. The only 
way
for your script to detect this is to try to send data back to the 
client. If
the connection is closed, you'll receive SIGPIPE (which by default will
terminate your process).

You can catch the SIGPIPE and do a graceful shutdown on the db 
connection.

If you're in the middle of a query, you won't be able to detect the
connection being closed until the DBI call returns.
Note that while a plain CGI script might get a SIGPIPE, it won't be the 
case under mod_perl. There are no pipes under mod_perl and I have no 
idea how one would go about knowing if the user severed the connection.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response



Re: Killing a Process

2004-11-22 Thread Henri Asseily
On Nov 22, 2004, at 5:30 AM, Bob Showalter wrote:
Kevin Bass wrote:
I have a slight problem that I am attemping to solve. I am using
CGI/Perl (DBD Oracle) on Linux AS 2.1 to access to the database. When
users encounter problems on the web, they cancel (or press stop) in
their browsers. This will stop there browser interaction and also
cause the database connection to not disconnect which causes a
runaway process. Is there an article that I can read or a
procedure/module or process that someone has written within CGI or
DBI (or sometimes else) that will allow me to kill my database
connection when a users stops an execute within his/her browser?
Thanks!
When the user presses the Stop button on their browser, the only  
thing
that happens is the connection back to the server is closed. The only  
way
for your script to detect this is to try to send data back to the  
client. If
the connection is closed, you'll receive SIGPIPE (which by default will
terminate your process).

You can catch the SIGPIPE and do a graceful shutdown on the db  
connection.

If you're in the middle of a query, you won't be able to detect the
connection being closed until the DBI call returns.
I take back my previous email. For mod_perl please check the docs:
http://perl.apache.org/docs/1.0/guide/ 
debug.html#Handling_the__User_pressed_Stop_button__case

H
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response



RE: Killing a Process

2004-11-21 Thread Reidy, Ron
Look at setting the sqlnet.expire_time parameter in your server's 
$ORACLE_HOME/network/admin/sqlnet.ora file.

-
Ron Reidy
Lead DBA
Array BioPharma, Inc.


-Original Message-
From: Kevin Bass [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 21, 2004 5:53 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Killing a Process


I have a slight problem that I am attemping to solve. I am using CGI/Perl
(DBD Oracle) on Linux AS 2.1 to access to the database. When users encounter
problems on the web, they cancel (or press stop) in their browsers. This
will stop there browser interaction and also cause the database connection
to not disconnect which causes a runaway process. Is there an article that I
can read or a procedure/module or process that someone has written within
CGI or DBI (or sometimes else) that will allow me to kill my database
connection when a users stops an execute within his/her browser?  Thanks!

Kevin


This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is 
intended 
to be for the use of the individual or entity named above. If you are not the 
intended recipient, please be aware that any disclosure, copying, distribution 
or use of the contents of this information is prohibited. Please notify the
sender  of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response