System Architecture 2-31

Orphaned Database Server Processes

The application development tool process and the database server process
communicate with each other through unnamedUNIX pipes. Each process
readsfrom one pipe and writes to the other. This interaction is illustrated in
Figure2-3.
Orphaned Database Server Processes
Adatabase server process is considered orphaned when the application devel-
opment tool process (the parent process) dies prematurely and cannot
terminate its associated database server process (the child process). The
databaseserver process continues working, orphaned, and can create bottle-
necks in the system. For example, an orphaned server process might hold
shared-memory resources without properly releasing them, forcing legit-
imateserver processes to wait indefinitely. Youmight be unable to gracefully
take OnLine to quiescent mode if an orphaned process remains attached to
shared memory. The lingering process must be killed before OnLine can be
brought to offline mode.
Thedatabase server process eventually discovers that its parent process has
diedwhen the server process begins reading from or writing to a pipe. If the
server process is reading from a pipe, it receives a -1 or 0 from the blocked
read.If the server process is writing to a pipe, it receives a SIGPIPE signal. The
SIGPIPE signal indicates that the server is trying to write to a pipe whose
oppositeend has been closed. At this point, the server process automatically
performs cleanup and terminates gracefully.
You might be tempted to kill a server process if you suspect the process is
orphaned. If the database server process is doing work, you might find
yourselfwaiting for the process to return to the pipe to read or to write. If the
server process is in a wait state, waiting for a latch or a lock to be released,
this delay could be lengthy.
Figure2-3
The application
process and the
database server
process
communicate
through unnamed
UNIX pipes.
Read
Application
process
Database
server
process
Write
Read Write