Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[SOLVED] Apache 2 crashes when logrotate archives log file

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
feldespato
n00b
n00b
User avatar
Posts: 57
Joined: Sun Nov 28, 2004 1:49 pm
Location: Port de Sagunt, País Valencià

[SOLVED] Apache 2 crashes when logrotate archives log file

  • Quote

Post by feldespato » Wed Mar 01, 2006 4:33 pm

I'm using apache-2.0.55-r1. When logrotate archives the log file and creates a new one, apache crashes. I get the following log:

[Wed Mar 01 03:05:56 2006] [notice] Graceful restart requested, doing restart
[Wed Mar 01 03:05:56 2006] [notice] seg fault or similar nasty error detected in the parent process

the httpd process dies, so I need to do a "killall apache2" to get apache working again

I've seen this is because the logrotate scripts call /etc/init.d/apache2 reload, and this command crashes the server. If I change "reload" by "restart" in /etc/logrotate.d/apache2 it works fine.
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
Top
F.Ultra
Apprentice
Apprentice
Posts: 169
Joined: Wed Mar 17, 2004 9:14 am
Location: Sweden

  • Quote

Post by F.Ultra » Wed Mar 01, 2006 6:20 pm

If I where you then I would look into why the reload causes apache to crash, it seams unnecessary to do a restart in order to simply rotate the logfiles, especially since restart causes a slight downtime for the websites handled by apache.
Top
feldespato
n00b
n00b
User avatar
Posts: 57
Joined: Sun Nov 28, 2004 1:49 pm
Location: Port de Sagunt, País Valencià

  • Quote

Post by feldespato » Wed Mar 01, 2006 9:50 pm

How can I find the reason for the reload process to crash the server?
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
Top
F.Ultra
Apprentice
Apprentice
Posts: 169
Joined: Wed Mar 17, 2004 9:14 am
Location: Sweden

  • Quote

Post by F.Ultra » Thu Mar 02, 2006 2:38 pm

That is a good question :D

I have myself not upgraded to 2.0.55-r1 yet (runs 2.0.55 as of now) so perhaps there is a bug in 2.0.55-r1? I will try and upgrade myself this weekend and will have look if mine crashes too, if it does then we have a new bugzilla entry for sure.

That the reload does is simply send "-k graceful" to the apache process telling it to do a graceful restart, one way to check is to enable all kinds of debug output in apache (dont know how to do that though) and run reload and see if there is some additional info that might give you a clue regarding why it crashes.
Top
rsteed
n00b
n00b
Posts: 11
Joined: Fri Feb 24, 2006 10:53 am

  • Quote

Post by rsteed » Thu Mar 02, 2006 4:52 pm

I find the best solution to be rotatelogs. This method takes advantage of Apache2's piped logging feature enabling log rotation without a restart. :D

http://httpd.apache.org/docs/2.0/progra ... elogs.html
Top
F.Ultra
Apprentice
Apprentice
Posts: 169
Joined: Wed Mar 17, 2004 9:14 am
Location: Sweden

  • Quote

Post by F.Ultra » Thu Mar 02, 2006 7:19 pm

It seams like I actually was runnint 2.0.55-r1 so I'm sorry to say feldespato that they problem seams to be local to your system for some reason.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic