Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] apache hangs after reloading a few pages
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Mon Oct 31, 2011 12:16 pm    Post subject: [SOLVED] apache hangs after reloading a few pages Reply with quote

Hello.

I had apache setup on my laptop, because from time to time I do some php web projects. I recently started a project after a 5 month break and discovered that my apache is very buggy. My system is up to date and my kernel is 3.0.6 (gentoo).

The server starts normally. It operates php pages normally. However, after loading a couple of pages (different ones or reloading the same page) the server stops responding (the page loading takes forever). Then I have to restart apache - I have to run "/etc/init.d/apache2 stop" at least 2 times to make it work. When I start it once more it operates normally for the first couple of pages and hangs again.

I've tried reverting to previous versions (down to 2.2.17), but it didn't help.

The configs are set by etc-updage to the appropriate version.

The worst thing is that the logs show NOTING unusual.

I'll try to emerge it with the "debug" flag, maybe it'll show some new logs, but for now: do you have any ideas what could be the problem ?

PS Is it normal that apache runs in 4 instances (processes) ? I do have a Core i3 (4 logical cores).
PPS The debug showed no new info in /var/log/apache2


Last edited by Gabriel_Blake on Mon Dec 12, 2011 10:55 pm; edited 4 times in total
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6347
Location: /usr/lib64/lv2

PostPosted: Mon Oct 31, 2011 1:40 pm    Post subject: Reply with quote

I've never seen apache have more than one process on my multi-core systems.

What happens if you downgrade your kernel?
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15991

PostPosted: Tue Nov 01, 2011 2:58 am    Post subject: Reply with quote

When Apache hangs, what is it doing? Is it spinning? Is it sleeping? If it spins, is it making any system calls? If it sleeps, what are the last calls it makes before it sleeps?
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6347
Location: /usr/lib64/lv2

PostPosted: Tue Nov 01, 2011 12:28 pm    Post subject: Reply with quote

Hu, you make it sound like Apache is either lazy or drunk. :P
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Wed Dec 07, 2011 10:16 pm    Post subject: Reply with quote

The same on old kernel :/

When apache hangs, it looks like this:
- the browser doesn't timeout (as it apache is responding, but not sending anything)
- the processor isn't loaded by apache (not a loop or anything)
- each of the 4 apache instances consumes around or less than 1% of my 4GB of RAM (not a memory leak)

Additionally:
- when I kill or stop apache it takes a while to die/stop.
- if i use -sKILL it dies instantly
- if I kill it and quickly hit "/etc/init.d/apache2 restart" the server hangs again after 1-2 page refreshes
- if i wait a moment between kill and restart, the server hangs after 3-6 page refreshes (so maybe a cache problem or something)
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6347
Location: /usr/lib64/lv2

PostPosted: Thu Dec 08, 2011 1:57 pm    Post subject: Reply with quote

By the way, the convention we use here calls for adding [SOLVED] to solved threads, but not to add [UNSOLVED] - that's implied unless marked with [SOLVED]. :wink:
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Fri Dec 09, 2011 10:04 am    Post subject: Reply with quote

I know... just trying to get people's attention :)

Anyway... I solved the problem... It was... unusual.

I'm fusing the Symfony Web Framework (1.4) for my web apps. It requires a bunch of modules to be installed with Php and Apache. This behavior was caused by the lack of USE="xsl" in dev-lang/php. (even though it says that xsl is optional for Symfony).

But still... no logs in Apache nor Symfony showed that something might be wrong.

Thanks for you attention :)
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Mon Dec 12, 2011 10:26 pm    Post subject: Reply with quote

I'm back... because so is the problem.

It wasn't my framework's fault after all... now apache won't start at all :!: I just get this all the time:

Code:
apache2               | * Stopping apache2 ...
apache2               |apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
apache2               |httpd (pid 24868?) not running                                                                                                               [ ok ]
apache2               | * Starting apache2 ...
apache2               |apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName


It doesn't not show up in "ps -A".

I've realized that when apache was hanging previously, it only happened on the development environment in my framework ? is that any clue ?

---EDIT---

Cleaning semaphores helped... I don't know how they work (yet) but "ipcs -s" looked like a mess.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum