# strange errors when starting apache2 [SOLVED]

## jakob-andreas

hi everybody,

yesterday is emerge php5, mysql and apache2. in general it works and i get access to http://127.0.0.1/ but when i start apache2 via

```
/etc/init.d/apache2 start
```

 i get some strange errors:

error_log:

```
POOL DEBUG: [18528/3078158080]  CREATE (        44/        44/    205635) 0x080A9538 "prefork.c:493" <prefork.c:493> (2/2/0)

POOL DEBUG: [18528/3078158080]  CREATE (         0/         0/    205635) 0x08144730 "prefork.c:496" <prefork.c:496> (0/0/0)

POOL DEBUG: [18528/3078158080]  PALLOC (        60/        60/    205651) 0x080A9538 "prefork.c:493" <memory/unix/apr_pools.c:1959> (3/3/0)

POOL DEBUG: [18528/3078158080]  PALLOC (        68/        68/    205659) 0x080A9538 "prefork.c:493" <scoreboard.c:379> (4/4/0)

POOL DEBUG: [18528/3078158080]  PALLOC (       124/       124/    205715) 0x080A9538 "prefork.c:493" <poll/unix/epoll.c:102> (5/5/0)

POOL DEBUG: [18528/3078158080]  PALLOC (       148/       148/    205739) 0x080A9538 "prefork.c:493" <poll/unix/epoll.c:122> (6/6/0)

POOL DEBUG: [18528/3078158080]  PALLOC (       164/       164/    205755) 0x080A9538 "prefork.c:493" <memory/unix/apr_pools.c:1959> (7/7/0)

POOL DEBUG: [18528/3078158080]  PALLOC (       204/       204/    205795) 0x080A9538 "prefork.c:493" <poll/unix/epoll.c:124> (8/8/0)

POOL DEBUG: [18528/3078158080]  PALLOC (       232/       232/    205823) 0x080A9538 "prefork.c:493" <poll/unix/epoll.c:153> (9/9/0)

POOL DEBUG: [18528/3078158080]  PALLOC (       260/       260/    205851) 0x080A9538 "prefork.c:493" <poll/unix/epoll.c:153> (10/10/0)

POOL DEBUG: [18528/3078158080]  PALLOC (       276/       276/    205867) 0x080A9538 "prefork.c:493" <memory/unix/apr_pools.c:1959> (11/11/0)

POOL DEBUG: [18528/3078158080]   CLEAR (         0/         0/    205867) 0x08144730 "transaction" <prefork.c:547> (0/0/0)

POOL DEBUG: [18529/3078158080] PCALLOC (        28/        28/    205619) 0x080A9538 "prefork.c:493" <locks/unix/thread_mutex.c:50> (1/1/0)

POOL DEBUG: [18529/3078158080]  PALLOC (        44/        44/    205635) 0x080A9538 "prefork.c:493" <memory/unix/apr_pools.c:1959> (2/2/0)

POOL DEBUG: [18529/3078158080]  CREATE (        44/        44/    205635) 0x080A9538 "prefork.c:493" <prefork.c:493> (2/2/0)

POOL DEBUG: [18529/3078158080]  CREATE (         0/         0/    205635) 0x08144730 "prefork.c:496" <prefork.c:496> (0/0/0)

POOL DEBUG: [18529/3078158080]  PALLOC (        60/        60/    205651) 0x080A9538 "prefork.c:493" <memory/unix/apr_pools.c:1959> (3/3/0)

POOL DEBUG: [18529/3078158080]  PALLOC (        68/        68/    205659) 0x080A9538 "prefork.c:493" <scoreboard.c:379> (4/4/0)

POOL DEBUG: [18529/3078158080]  PALLOC (       124/       124/    205715) 0x080A9538 "prefork.c:493" <poll/unix/epoll.c:102> (5/5/0)

POOL DEBUG: [18529/3078158080]  PALLOC (       148/       148/    205739) 0x080A9538 "prefork.c:493" <poll/unix/epoll.c:122> (6/6/0)

POOL DEBUG: [18529/3078158080]  PALLOC (       164/       164/    205755) 0x080A9538 "prefork.c:493" <memory/unix/apr_pools.c:1959> (7/7/0)

POOL DEBUG: [18529/3078158080]  PALLOC (       204/       204/    205795) 0x080A9538 "prefork.c:493" <poll/unix/epoll.c:124> (8/8/0)

POOL DEBUG: [18529/3078158080]  PALLOC (       232/       232/    205823) 0x080A9538 "prefork.c:493" <poll/unix/epoll.c:153> (9/9/0)

POOL DEBUG: [18529/3078158080]  PALLOC (       260/       260/    205851) 0x080A9538 "prefork.c:493" <poll/unix/epoll.c:153> (10/10/0)

POOL DEBUG: [18529/3078158080]  PALLOC (       276/       276/    205867) 0x080A9538 "prefork.c:493" <memory/unix/apr_pools.c:1959> (11/11/0)

POOL DEBUG: [18529/3078158080]   CLEAR (         0/         0/    205867) 0x08144730 "transaction" <prefork.c:547> (0/0/0)

[Tue Feb 12 12:05:36 2008] [notice] Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8g PHP/5.2.5-pl1-gentoo configured -- resuming normal operations

```

the "POOL DEBUG"-thing comes thousand times. can anybody tell me what it is, how to fix and where it comes from?

i installed apache as follows:

```
 www-servers/apache-2.2.8  USE="debug doc ssl -ldap (-selinux) -sni -static -suexec -threads" APACHE2_MODULES="authz_host dir mime userdir -actions -alias -asis -auth_basic -auth_digest -authn_alias -authn_anon -authn_dbd -authn_dbm -authn_default -authn_file -authz_dbm -authz_default -authz_groupfile -authz_owner -authz_user -autoindex -cache -cern_meta -charset_lite -dav -dav_fs -dav_lock -dbd -deflate -disk_cache -dumpio -env -expires -ext_filter -file_cache -filter -headers -ident -imagemap -include -info -log_config -log_forensic -logio -mem_cache -mime_magic -negotiation -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -rewrite -setenvif -speling -status -unique_id -usertrack -version -vhost_alias" APACHE2_MPMS="-event -itk -peruser -prefork -worker"
```

i did not change any of the configurationfiles. don't know what to do now!Last edited by jakob-andreas on Sun Feb 17, 2008 12:43 pm; edited 1 time in total

----------

## elgato319

get "debug" out of your USE-Flags.

re-emerge apache and you should be fine

----------

## jakob-andreas

ok, i emerged apache with USE="-debug" but still the same problem. very much output at startup and when i stop apache. but i can still access the index.php in the www-root. some other ideas?

----------

## Havin_it

It looks like the problem is you don't have any APACHE2_MPMS selected. If you don't have this variable in make.conf, add it and include one of the flags listed above. You can get information about the different MPMs in httpd.conf or on the Apache website.

As you currently have USE="-threads", if you stick with that your only choice is APACHE2_MPMS="prefork" -- this probably explains the errors you are seeing. If you change to USE="threads" (note that there might be system-wide changes necessary to enable this), "worker" is the recommended MPM.

----------

## jakob-andreas

i still get this errors! i emerged apache with USE="-debug -threads" APACHE2_MPMS="prefork" and USE="-debug threads" APACHE2_MPMS="worker". both with the same result. i'll tri -threads and worker nox...

ok, here i get a compile-error... -threads and worker is an invalid use-flag combination

----------

## Havin_it

Yup, the flag and MPM choice are tied together. prefork is only for -threads, the rest require +threads.

BTW, I doubt that this is the root of your problem, but PHP's USE setting for threads must match that of apache.  You could always try removing "-D PHP5" from /etc/conf.d/apache2 and see if things run smoother.

Just for interest, can you post the output of "/usr/sbin/apache2 -l" (that flag is a lowercase 'L' BTW) to show you have the mpm module you're supposed to? (Let us know what your current USE and MPM settings are at the time as well.)

----------

## jakob-andreas

the output of "/usr/sbin/apache2 -l": 

```
 OL DEBUG: [15526/3078420224] PCALLOC (     13179/     13699/     14863) 0x0809F7E0 "pconf" <tables/apr_tables.c:66> (615/615/0)

POOL DEBUG: [15526/3078420224]  PALLOC (       644/     14415/     14883) 0x0809F510 "process" <tables/apr_tables.c:88> (4/4/0)

POOL DEBUG: [15526/3078420224] PCALLOC (       652/     14423/     14891) 0x0809F510 "process" <tables/apr_tables.c:66> (5/5/0)

POOL DEBUG: [15526/3078420224]  PALLOC (       700/     14471/     14939) 0x0809F510 "process" <misc/unix/getopt.c:45> (6/6/0)

POOL DEBUG: [15526/3078420224]  PALLOC (       712/     14483/     14951) 0x0809F510 "process" <misc/unix/getopt.c:58> (7/7/0)

POOL DEBUG: [15526/3078420224]  PALLOC (       715/     14486/     14954) 0x0809F510 "process" <strings/apr_strings.c:78> (8/8/0)

POOL DEBUG: [15526/3078420224]  PALLOC (       120/       120/     15002) 0x0809F838 "pcommands" <misc/unix/getopt.c:45> (7/7/0)

POOL DEBUG: [15526/3078420224]  PALLOC (       132/       132/     15014) 0x0809F838 "pcommands" <misc/unix/getopt.c:58> (8/8/0)

Compiled in modules:

  core.c

  prefork.c

  http_core.c

  mod_so.c

POOL DEBUG: [15526/3078420224] DESTROY (       715/     14546/     15014) 0x0809F510 "process" <main.c:260> (8/8/0)

POOL DEBUG: [15526/3078420224] DESTROY (       132/       132/     15014) 0x0809F838 "pcommands" <main.c:260> (8/8/0)

POOL DEBUG: [15526/3078420224] DESTROY (     13179/     13699/     14882) 0x0809F7E0 "pconf" <main.c:260> (615/615/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14882) 0x080A8560 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14862) 0x080A82A0 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14842) 0x080A7FE0 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14822) 0x080A7D20 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14802) 0x080A7A60 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14782) 0x080A77A0 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14762) 0x080A74E0 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14742) 0x080A7220 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        48/        48/     14722) 0x080A6F28 "hooks/apr_hooks.c:195" <main.c:260> (3/3/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14674) 0x080A6C68 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14654) 0x080A69A8 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14634) 0x080A66E8 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14614) 0x080A6428 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14594) 0x080A6168 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        48/        48/     14574) 0x080A5E70 "hooks/apr_hooks.c:195" <main.c:260> (3/3/0)

POOL DEBUG: [15526/3078420224] DESTROY (        84/        84/     14526) 0x080A5B48 "hooks/apr_hooks.c:195" <main.c:260> (4/4/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14442) 0x080A5888 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14422) 0x080A55C8 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14402) 0x080A5308 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (        20/        20/     14382) 0x080A4E38 "hooks/apr_hooks.c:195" <main.c:260> (2/2/0)

POOL DEBUG: [15526/3078420224] DESTROY (       468/       468/       468) 0x0809F008 "APR global pool" <memory/unix/apr_pools.c:1269> (19/19/0)

POOL DEBUG: [15526/3078420224] DESTROY (         0/         0/       468) 0x0809F4B8 "apr_initialize" <memory/unix/apr_pools.c:1269> (0/0/0)

```

and many errors more.

my USE-flags for apache: doc, ssl, all the others are disabled

MPMS: prefork

does it help you?

----------

## jakob-andreas

ok, i tried out something more...! i emerged apache with all possible mpms. when i use worker (and use=threads) my browser waits for a respond of my apache-server but doesnt get one. same with event as mpm. itk, peruser and prefork work better, but i still get the errors - doesnt matter which mpm is used.

----------

## jakob-andreas

well, i made a world-update - no results. when i use apache with threads enabled and as mpm worker, i can not open http://127.0.0.1 ! is ist possible, that nptl and threads won't work together? i have both enabled and this is the only thing that comes to my mind. without threads and mpm is prefork apache works fine. with these strange errors, but it works.

----------

## Havin_it

Not sure if I will be preaching to the choir when I say this (apologies if so), but note that the nptl flag affects glibc and probably other core stuff, so if you switch it you should do an emerge -e (or at least -NuD) system+world afterwards. There is also an additional flag 'nptlonly' that forbids use of the old threads implementation, so if nptl is on, this should be too. (Of course this choice will mean you can't use prefork, but I don't think choice of one MPM over another is the root of your problem here; either one should work under the appropriate system configuration.)

If I sound knowledgeable here, don't be fooled  :Wink:  I just remember some of this stuff from the upgrade to glibc-2.4. Hope it's some help anyway.

----------

## jakob-andreas

thanks for your answers. i use now the mpm prefork without threads enabled in use-flag. this works good and i can use php-scripts to send requests to a mysql-database - as i need it!

but i have still the same problem when i start apache. changing the use-flags has no effect on this. is there a "verbose"-configuration possible in one of the apache-files?

-- ok, i had RC_VERBOSE="yes" in /etc/conf.d/rc, changed it to no and still the same problem...

----------

## Havin_it

Just a thought, don't know if it will help, but you might try re-emerging apr and apr-utils (since apr is mentioned in the output).

----------

## jakob-andreas

YEAH!!! i emerge apr and apr-util without debug and now it works!!!

```
USE="-debug" emerge -1 apr apr-util
```

 and after this apache did not want to start, so i emerge apache again. 

```
USE="-debug -threads" emerge apache
```

 now i have no errors in my output!

thanks! i will mark the topic as solved!

----------

