session_set_save_handler(“open”, “close”, “read”, “write”, “destroy”, “gc”); function read($id) { //if we can’t find the data for this session, we must return ” (empty string) , can’t return false return ”; }Read More →

This is mostly because the script is hang at some point , the server still keeps the connection, this will end up where server can’t accept new connection. This is a dirty approach – it will kill all process having waiting time > 30s #/bin/bash #Delete all apache having process with waiting time >30s GetAllWorkers() { AllWorkers=$(apache2ctl fullstatus | grep ” W ” | awk ‘$6>30 {print $2}’) for PID in $AllWorkers; do echo stopping $PID with SIGTERM kill -9 $PID done } GetAllWorkersRead More →