System Architecture 2-31
Orphaned Database Server Processes
The application development tool process and the database server process
communicate with each other through unnamed UNIX pipes. Each process
reads from one pipe and writes to the other. This interaction is illustrated in
Figure 2-3.
Orphaned Database Server Processes
A database 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
database server 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-
imate server processes to wait indefinitely. You might 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.
The database server process eventually discovers that its parent process has
died when 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
opposite end 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
yourself waiting 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.
Figure 2-3
The application
process and the
database server
process
communicate
through unnamed
UNIX pipes.
Read
Application
process
Database
server
process
Write
Read
Write