Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: NewBie - Unix fork and connect to oracle
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).
![]() |
![]() |