473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Restart

The Restart shortcut for Apache doesn't work properly for me. The restart seems to have succeeded, but then I can't access any pages on the server. Requests time out. It does work when I stop then server, then start the server. I've written a batch file to do it automatically, but I'd still like to know why a regular restart doesn't work.
Sep 22 '07 #1
15 3517
Anybody? I can provide further information if necessary.
Sep 22 '07 #2
docdiesel
297 Expert 100+
Hi,

which error code is appearing in the browser? 403, 404? Did you check if port 80 (and maybe 443 for ssl) are open (netstat -lntp)? What's apache saying in error.log?

Regards, Bernd
Sep 24 '07 #3
Well, here's the log for the restart.

Expand|Select|Wrap|Line Numbers
  1. [Wed Sep 26 16:30:48 2007] [notice] Parent: Received restart signal -- Restarting the server.
  2. [Wed Sep 26 16:30:48 2007] [notice] Child 5716: Exit event signaled. Child process is ending.
  3. [Wed Sep 26 16:30:49 2007] [notice] Apache/2.2.4 (Win32) mod_ssl/2.2.4 OpenSSL/0.9.8d PHP/5.2.4 configured -- resuming normal operations
  4. [Wed Sep 26 16:30:49 2007] [notice] Server built: Jan  9 2007 23:17:20
  5. [Wed Sep 26 16:30:49 2007] [notice] Parent: Created child process 6540
  6. [Wed Sep 26 16:30:49 2007] [notice] Child 5716: Released the start mutex
  7. [Wed Sep 26 16:30:50 2007] [notice] Child 6540: Child process is running
  8. [Wed Sep 26 16:30:50 2007] [notice] Child 6540: Acquired the start mutex.
  9. [Wed Sep 26 16:30:50 2007] [notice] Child 6540: Starting 250 worker threads.
  10. [Wed Sep 26 16:30:50 2007] [notice] Child 5716: Waiting for 250 worker threads to exit.
  11. [Wed Sep 26 16:30:50 2007] [notice] Child 5716: All worker threads have exited.
  12. Error in my_thread_global_end(): 2 threads didn't exit
  13.  thread to listen on port 8080.
  14. [Wed Sep 26 16:30:50 2007] [notice] Child 6540: Starting thread to listen on port 443.
  15. [Wed Sep 26 16:30:55 2007] [notice] Child 5716: Child process is exiting
I think everything's fine until line 10. Why does it exit again?

My restart command is as follows:
Expand|Select|Wrap|Line Numbers
  1. httpd -n "Apache2" -k restart
And it seems like it works, but then the server just doesn't respond.
Sep 26 '07 #4
Anybody else have an idea?
Sep 29 '07 #5
Motoma
3,237 Expert 2GB
It looks like two threads did not stop, meaning you didn't get access to the port back.

Try a full stop, and search through the output of ps to see if any httpd/apache threads are still running, and kill them. Then start the service again.
Oct 1 '07 #6
It looks like two threads did not stop, meaning you didn't get access to the port back.

Try a full stop, and search through the output of ps to see if any httpd/apache threads are still running, and kill them. Then start the service again.
Again, it works if I do httpd -k stop then httpd -k start. But a full stop/start of the service takes much longer than a simple httpd -k restart. That's why I'm asking.
Oct 4 '07 #7
Motoma
3,237 Expert 2GB
Again, it works if I do httpd -k stop then httpd -k start. But a full stop/start of the service takes much longer than a simple httpd -k restart. That's why I'm asking.
Does the graceful restart option work?
Oct 4 '07 #8
might be multiple instances opening.. like connection pools ... they cause this to occur...
also may me its already started in you dont see the refreshed version ...
well this is a major issue with apache ... me face it often ... that's why me shifted to WAMP server..
http://www.wampserver.com/en/
its a much more user friendly ... for PHP i mean ...
Oct 4 '07 #9
:p












p
Oct 4 '07 #10
Does the graceful restart option work?
I'm fairly certain that httpd -k restart is graceful by default.

Also, I can't switch servers. I'm committed to Apache, I'm learning it's modules, etc. It took forever to get it set up the way it is now. Switching server software is not an option.
Oct 4 '07 #11
Motoma
3,237 Expert 2GB
I'm fairly certain that httpd -k restart is graceful by default.

Also, I can't switch servers. I'm committed to Apache, I'm learning it's modules, etc. It took forever to get it set up the way it is now. Switching server software is not an option.
Well then, have you tried the un-graceful approach?
Oct 5 '07 #12
Well then, have you tried the un-graceful approach?
I'm not sure how to do that. I'm pretty sure the ungraceful approach is simply shutting down the apache2 windows service and restarting it. Again, though, that's what I'm trying to avoid. Takes a while.
Oct 5 '07 #13
Motoma
3,237 Expert 2GB
I'm not sure how to do that. I'm pretty sure the ungraceful approach is simply shutting down the apache2 windows service and restarting it. Again, though, that's what I'm trying to avoid. Takes a while.

I'm sorry, I completely overlooked that you were running on Windows.
How did you go about installing Apache? Did you use the Apache standalone installer, or did you opt to go with a bundled package, such as WAMP or Netserver?
Oct 9 '07 #14
docdiesel
297 Expert 100+
Hi,

as far as I can see from the log port 443 is opening again, so you should be able to access your html pages via https. What's missing, is port 8080/http. Looks as if it could not be detached while stopping the Apache. Could be there's some old, broken requests still blocking a socket.

Try restarting the Apache after a fresh start, when there has been no http call so far. Still the same problem? If not, have a look at the ones behind Apache (e.g. PHP and MySQL).

Regards, Bernd
Oct 9 '07 #15
Hi,

as far as I can see from the log port 443 is opening again, so you should be able to access your html pages via https. What's missing, is port 8080/http. Looks as if it could not be detached while stopping the Apache. Could be there's some old, broken requests still blocking a socket.

Try restarting the Apache after a fresh start, when there has been no http call so far. Still the same problem? If not, have a look at the ones behind Apache (e.g. PHP and MySQL).

Regards, Bernd
Nope. If I use the cmd -k restart command, not even HTTPS works. I've given up on this, httpd itself works and my configuration is so complex by now that I don't care to go through reinstalling everything.
Oct 21 '07 #16

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Piotr Trawiński | last post by:
I have this notorious problem: at some point pgsql simply hangs up and requires a restart. --------------------------------------------------------------------------- -------...
1
by: localhost | last post by:
In the Application_OnStart, I make some data calls and place the results in the HTTP cache. Sometimes, the database is not available when the application starts up, so I want to sleep for 20...
18
by: amdishigh | last post by:
We are experiencing the following problems concerning ASP.NET: our ASP.NET application, written in .NET 1.1 platform, and hosted in IIS 5.0 environment, experience frequent session timeout problem....
3
by: Pint | last post by:
I would like to know if there is a programatic way to force the Application object to restart. I have a hosted website where I will be unable to control the webserver (eg:iisreset), and I would...
3
by: John A Grandy | last post by:
In ASP.NET 1.1 and/or 2.0 ..... Is it possible to configure a web-app so that replacement of an .xml file ( physically located under the virtual dir root ) with a newer version of the file...
6
by: Leonardo Curros | last post by:
Hello, I would like to know what's the best way to restart one service. I would like to do it from the service itself. Is this possible? I try it with ServiceController.stop()...
8
by: kenneth fleckenstein nielsen | last post by:
hi guru's I want to restart my webservice when ever it throws an exception that isn't cought. can i do that by web.config or iss or how ??
4
by: shorti | last post by:
Can anyone explain in greater (and more comprehensive) detail what the RESTART option does in the ALTER TABLE table ALTER COLUMN statement. This is the description in Info Center: RESTART or...
3
by: MarkusJNZ | last post by:
Hi, I have two different applications running on 2003 both in two different vitrual directories. One application runs on the .NET framework 1.1 whilst the other runs on 2.0. If I change the...
1
by: Brian Simmons | last post by:
Hi All, I know that if you modify the web.config file or any file in the App_Code subfolder, that ASP.net 2.0 will "restart" the application (i.e. clear out any sessions, etc...). Are there...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.