Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: NewBie - Unix fork and connect to oracle

Re: NewBie - Unix fork and connect to oracle

From: Ronald <ronr_at_wxs.nl>
Date: Mon, 10 May 1999 7:08:14 +0200
Message-ID: <01HW.B35C365E00036827124ACA70@news.wxs.nl>

On Sat, 8 May 1999 14:50:34 +0200, Axiomatique wrote (in message <3734331A.474ACD8E_at_axiomatique.com>):
>
> I am unable to understand, what is going wrong. Server Code // Open a
> connection to database
>
> In I N F I N I T E L O O P // Upon receipt of a message from client. 1.
> Forks a child, and tries to service the client. 2. Child exits after
> servicing the client
>
> SERVER -...// CODE IS HANGING HERE, no m
>
> How should I structure to handle various requests from the clients. I need
> to access the database for every client. Number of clients can be upto 100
> simaltaneous.
>
> Any views are solicited and appreciated.
>
> I know, I could read the PRO/C book, but unable to find it and I need to
>
> finish this code quite early.
>
> Any Help , ANY BODY.
>
> Regards Deepak
>
>
>

When you are connected in the server while forking, you share the connection data with the client. This makes oracle unhappy and kill's your server connection when disconnecting the client.

1) don't connect the server at all.
2) disconnect the server before forking.
3) use oci to create separate data areas for every connection (server & 
client).
--
Ronald - Unix SA
http://home.wxs.nl/~ronr/professional.html Received on Mon May 10 1999 - 00:08:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US