Skip to content
Snippets Groups Projects
Commit 355feb42 authored by Till Brehm's avatar Till Brehm
Browse files

Fixed: FS#3278 - Semaphore processes httpd rescue

parent 91bb6126
No related branches found
No related tags found
No related merge requests found
...@@ -272,6 +272,17 @@ class rescue_core_module { ...@@ -272,6 +272,17 @@ class rescue_core_module {
/* Set the new try counter */ /* Set the new try counter */
$this->_rescueData['webserver']['try_counter'] = $tryCount; $this->_rescueData['webserver']['try_counter'] = $tryCount;
if ($tryCount > 2 && $conf['serverconfig']['web']['server_type'] != 'nginx') {
if($app->system->is_user('apache')) {
$app->log("Clearing semaphores table for user apache.",LOGLEVEL_WARN);
exec("ipcs -s | grep apache | awk '{ print $2 }' | xargs ipcrm sem");
}
if($app->system->is_user('www-data')) {
$app->log("Clearing semaphores table for user apache.",LOGLEVEL_WARN);
exec("ipcs -s | grep www-data | awk '{ print $2 }' | xargs ipcrm sem");
}
}
/* if 5 times will not work, we have to give up... */ /* if 5 times will not work, we have to give up... */
if ($tryCount > 5){ if ($tryCount > 5){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment