Sponsored Content
Top Forums Shell Programming and Scripting need help: shell script to restart apache when no. of processes keeps growing Post 302109591 by _joshua_ on Tuesday 6th of March 2007 11:28:06 PM
Old 03-07-2007
Quote:
Originally Posted by zazzybob
Have you tried setting MaxClients within your Apache configuration as I indicated above?

You should really be concentrating your efforts on trying to find the cause of the issue, rather than circumventing it with a shonky workaround.

Cheers
ZB
Thanks ZB, you are absolutely right.
I tried to change MaxClients, but because the number of processes grows almost infinitely, I know something must be wrong which is causing the issue.
Sadly I only know it should has something to do with mysql, but no idea how to get closer.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

suspend/restart a process in shell script

Hi, I have a task that Im stuck on. I have an elementary script named 'myscript' that prints "the script is running" once a second. It runs for 27 seconds. I need to write a 2nd script that starts 'myscript' and takes a parameter '$1' for a number. my 2nd script then needs to pause myscript... (1 Reply)
Discussion started by: daneensign
1 Replies

2. Web Development

Can't restart apache. PHP is broken.

I need to restart my apache, but apachectl configtest tells me that Syntax error on line 208 of /etc/httpd/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: /usr/local/apache/libexec/libphp4.so: undefined symbol: ap_signal I've tried rebuilding php, I'm not... (2 Replies)
Discussion started by: tatebn
2 Replies

3. Shell Programming and Scripting

Restart Logic for a Korn Shell Master Script

Hello All, I was wondering if someone can help me to develop restart logic for a Korn Shell program (a master script) that I am developing. The program is design to invoke a series of child processes (Korn Shell Scripts) whose function is to create a series of load files on a specified mount... (0 Replies)
Discussion started by: jonesdk5
0 Replies

4. Web Development

How to keep process running after apache restart.

Hi, I have a PHP application that starts a couple of processes on the server...the problem is that if I restart apache those running apps will die. How can I start them in a way that they are not killed when I restart/stop apache ? $cmdstr = "nohup ".$config."/".$config."... (6 Replies)
Discussion started by: valiadi
6 Replies

5. Shell Programming and Scripting

How to keep process running after apache restart.

I have posted this on the Web subforum but it seems that nobody knows to do this, maybe someone has a solution here. Thank you I have a PHP application that starts a couple of processes on the server...the problem is that if I restart apache those running apps will die. How can I start them... (1 Reply)
Discussion started by: valiadi
1 Replies

6. Shell Programming and Scripting

Help scripting to start, check, and restart processes

Here it goes from my unexperienced point of view. I am using CentOS 5.6. I have a Java based server that needs to be running 24/7/365. To begin from the machine the server is on rebooting; I SSH in to a shell, cd to the server dir, screen -S server1, and execute ./exec (listed below) in the screen.... (12 Replies)
Discussion started by: MacG32
12 Replies

7. Shell Programming and Scripting

Script to restart apache when running out of memory

Hi, I have a problem with running out of memory in my Ubuntu web server (4GB RAM) because many people try to access my server. I used to restart manually my apache server to clear out the memory & swap. Can anyone tell me how to write bash script that can automatically restart apache when... (2 Replies)
Discussion started by: nica
2 Replies

8. Red Hat

Error Restart apache

Hi Im apache service restart Error $ service httpd reload Reloading httpd: service httpd reload Reloading httpd: service httpd start Starting httpd: (98)Address already in use: make_sock: could not bind to address :80 (98)Address already in... (1 Reply)
Discussion started by: mnnn
1 Replies

9. Red Hat

Apache service not coming up after restart

When I update the server with new SSL certificates, and restart httpd, I get errors : # service httpd restart Stopping httpd: rm: cannot remove `/usr/local/apache2/bin/httpd/logs/httpd.pid': Not a directory Starting httpd: ... (0 Replies)
Discussion started by: anaigini45
0 Replies

10. Shell Programming and Scripting

How to restart shell script when cpu is 0.0%?

Hello, My operating system is ubuntu 16.04. I need to kill or restart a shell script when cpu usage of related process is equal to 0.0% for X seconds. Appearing name on top page is vlc While surfing on forums, I found below script but not sure how to edit: Also don't know the function of -gt... (7 Replies)
Discussion started by: baris35
7 Replies
Apache::TestConfig(3pm) 				User Contributed Perl Documentation				   Apache::TestConfig(3pm)

NAME
Apache::TestConfig -- Test Configuration setup module SYNOPSIS
use Apache::TestConfig; my $cfg = Apache::TestConfig->new(%args) my $fh = $cfg->genfile($file); $cfg->writefile($file, $content); $cfg->gendir($dir); ... DESCRIPTION
"Apache::TestConfig" is used in creating the "Apache::Test" configuration files. FUNCTIONS
genwarning() my $warn = $cfg->genwarning($filename) genwarning() returns a warning string as a comment, saying that the file was autogenerated and that it's not a good idea to modify this file. After the warning a perl trace of calls to this this function is appended. This trace is useful for finding what code has created the file. my $warn = $cfg->genwarning($filename, $from_filename) If $from_filename is specified it'll be used in the warning to tell which file it was generated from. genwarning() automatically recognizes the comment type based on the file extension. If the extension is not recognized, the default "#" style is used. Currently it support "<!-- -->", "/* ... */" and "#" styles. genfile() my $fh = $cfg->genfile($file); genfile() creates a new file $file for writing and returns a file handle. If parent directories of $file don't exist they will be automagically created. The file $file and any created parent directories (if found empty) will be automatically removed on cleanup. A comment with a warning and calls trace is added to the top of this file. See genwarning() for more info about this comment. my $fh = $cfg->genfile($file, $from_file); If $from_filename is specified it'll be used in the warning to tell which file it was generated from. my $fh = $cfg->genfile($file, $from_file, $nowarning); If $nowarning is true, the warning won't be added. If using this optional argument and there is no $from_file you must pass undef as in: my $fh = $cfg->genfile($file, undef, $nowarning); writefile() $cfg->writefile($file, $content, [$nowarning]); writefile() creates a new file $file with the content of $content. A comment with a warning and calls trace is added to the top of this file unless $nowarnings is passed and set to a true value. See genwarning() for more info about this comment. If parent directories of $file don't exist they will be automagically created. The file $file and any created parent directories (if found empty) will be automatically removed on cleanup. write_perlscript() $cfg->write_perlscript($filename, @lines); Similar to writefile() but creates an executable Perl script with correctly set shebang line. gendir() $cfg->gendir($dir); gendir() creates a new directory $dir. If parent directories of $dir don't exist they will be automagically created. The directory $dir and any created parent directories will be automatically removed on cleanup if found empty. Environment Variables The following environment variables affect the configuration and the run-time of the "Apache::Test" framework: APACHE_TEST_COLOR To aid visual control over the configuration process and the run-time phase, "Apache::Test" uses coloured fonts when the environment variable "APACHE_TEST_COLOR" is set to a true value. APACHE_TEST_LIVE_DEV When using "Apache::Test" during the project development phase, it's often convenient to have the project/lib (live) directory appearing first in @INC so any changes to the Perl modules, residing in it, immediately affect the server, without a need to rerun "make" to update blib/lib. When the environment variable "APACHE_TEST_LIVE_DEV" is set to a true value during the configuration phase ("t/TEST -config", "Apache::Test" will automatically unshift the project/lib directory into @INC, via the autogenerated t/conf/modperl_inc.pl file. Special Placeholders When generating configuration files from the *.in templates, special placeholder variables get substituted. To embed a placeholder use the "@foo@" syntax. For example in extra.conf.in you can write: Include @ServerRoot@/conf/myconfig.conf When extra.conf is generated, "@ServerRoot@" will get replaced with the location of the server root. Placeholders are case-insensitive. Available placeholders: Configuration Options All configuration variables that can be passed to "t/TEST", such as "MaxClients", "DocumentRoot", "ServerRoot", etc. To see the complete list run: % t/TEST --help and you will find them in the "configuration options" sections. NextAvailablePort Every time this placeholder is encountered it'll be replaced with the next available port. This is very useful if you need to allocate a special port, but not hardcode it. Later when running: % t/TEST -port=select it's possible to run several concurrent test suites on the same machine, w/o having port collisions. AUTHOR
SEE ALSO
perl(1), Apache::Test(3) perl v5.14.2 2011-12-26 Apache::TestConfig(3pm)
All times are GMT -4. The time now is 07:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy