You should use some external memory for Apache processes.
The main options:
- Database.
- Shared memory (OS dependent).
- Another process and use of an IPC mechanism (e.g. socket)
- File.
Which one is right depends on your requirements, and you can combine them. For example, a “database” is actually implemented as another process that makes things persistent in a file and deals with concurrency problems in a known manner.
, , , , , .