I'm running Debian on a machine that has limited memory and no option to add swap space. The machine serves as a web and database server. The problem I'm seeing is that when multiple web requests come in, my database stops accepting connections and sometimes even crashes because the system has no more available RAM.
Is it possible to tell Linux to kill specific processes (in my case, Apache) in case another process (in my case, Firebird) requests memory and there is not enough? If it is not possible to do natively, maybe there is some tool to help me achieve this?