status 3221225477; Apache needs to close. Memory leak? CPU?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

status 3221225477; Apache needs to close. Memory leak? CPU?

Postby CPcoder » 17. February 2006 14:07

...not that I really know what a memory leak is, but here's why. I got the alert "Apache has encountered an error and needs to close". When it sounded like the disk stopped churning, XAMPP Control showed that it was still running, I don't know if it was confused or if Windows really wasn't able to stop Apache (that would shock me). So I clicked the "Stop" button. After it showed that Apache stopped, I restarted it.

Before this, I had been trying in vain to get SSI and especially SSI calling a script to work (see this topic). My .shtml page worked fine including the results of the script. However, I couldn't check the .phtml page because Windows foiled me again! I assume it's fine. BTW, it's a simple script, just another version of "Hello, world".

TO SUM UP:
  1. I did remember to stop and start Apache with XAMPP Control after making the changes (SEE PREVIOUS POST).
  2. SSI would NOT show output of a script in an .shtml or .phtml page.
  3. Windows problem shut Apache down.
  4. XAMPP Control showed Apache still running after disk stopped churning, so I clicked "Stop" there, then "Start".
  5. The page I was able to view now shows the output of the script. (It didn't before.)
  6. Windows shuts Apache down again (and keeps doing it).


There is mention in the Apache docs that setting "MaxRequestsPerChild" can be useful to guard against memory leaks taking over all your memory, and right now it is set to "0" (UNLIMITED), the default. Maybe I should set it...what would be a good value? (This is not a production server, but I have a tendency to view pages multiple times in my browser...Firefox, except for fine-tuning CSS) while editing. Do you think this could be a memory-leak problem causing random errors?

Update:

BTW...I just now tried using a port other than 80, though I can't think of any software that would be using that port. It didn't help, just in case anyone was thinking of throwing that suggestion out. I used 8080 and still there is a problem with the server.

In fact, Windows just supposedly stopped Apache, twice. It still showed in XAMPP Control that Apache was still running, so I stopped it there so I wouldn't keep getting alerts that Apache needs to close. Once I get the alert, I can't access anything on localhost, seeming to indicate the server is indeed stopped, but the control program says otherwise.This is very, very strange.
Last edited by CPcoder on 23. February 2006 01:07, edited 1 time in total.
WinXP Home SP2
XAMPP 1.5.1 in top-level directory
Unzipped directly from .zip file
no other severs running
CPcoder
 
Posts: 30
Joined: 16. February 2006 08:44

Postby CPcoder » 22. February 2006 23:10

I'm sad to see there are no answers, but here is an interesting update...

I'm learning PHP, so I'm no expert. I can view static HTML pages just fine. If I try to load an HTML & PHP page, sometimes I get the "Apache has encountered an error and needs to close" message right away...other times I can view 1 HTML & PHP page fine, but the error will happen if I try to view another.

I wondered if it could be something in the way I wrote my PHP code, but that doesn't make much sense. 1 of the pages is very simple, just has some simple things like inserting the current date and time, and running an external "Hello, world!" script. Sometimes that causes the error, other times I can view it fine.

Another page is more complicated, prints out the multiplication tables. If this was the only page causing the problem, I could say maybe it's my code. But it's not the only page causing the problem. On the other hand, it does happen with this page every time. But it didn't cause a problem on the standard Apache install, only XAMPP. I should also point out I have no problem viewing any of the pages in the /xampp folder, only my own documents, and only non-static pages.

Could it be a bug in the PHP engine? An inconsistency in the way Apache and/or PHP works on Windows?

Has anyone else had the "needs to close" problem (on Win XP)?

I will post my code momentarily, and also my log file.
WinXP Home SP2
XAMPP 1.5.1 in top-level directory
Unzipped directly from .zip file
no other severs running
CPcoder
 
Posts: 30
Joined: 16. February 2006 08:44

MY HTML CODE timesTable.shtml

Postby CPcoder » 22. February 2006 23:16

Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
   <meta http-equiv="window-target" content="_top" />
   <title>PHP Times Tables</title>
</head>



<body>
<h1 align="center">PHP Times Tables <img src="graphics/php-power-micro.jpg" alt="Powered by PHP" width="80" height="15" hspace="5" vspace="0" border="0" title="Powered by PHP" galleryimg="no" /></h1>


<h2 align="center">The Times Table VIA SSI (below)</h2>

<p>I wrote and saved a script for the times tables as "timesTable.php", and if I wrote the script properly, the following SSI should display the results:</p>

<!--#include virtual="myPHP/timesTable.php" -->



</body>
</html>
WinXP Home SP2
XAMPP 1.5.1 in top-level directory
Unzipped directly from .zip file
no other severs running
CPcoder
 
Posts: 30
Joined: 16. February 2006 08:44

MY PHP CODE timesTable.php

Postby CPcoder » 22. February 2006 23:18

Code: Select all
<?php
// Iterate 12 times for 12 tables.
for($table = 1; $table < 13; $table++) {
   echo "<table width=\"*\" align=\"center\" cellpadding=\"4\" cellspacing=\"0\" border=\"1\">";
   echo "<tr><th>";
   echo "The " . $table . " Times Table";
   echo "</th></tr>";
   // Iterate 12 times for 12 multipliers.
   for($multiplier = 1; $multiplier < 13; $multiplier++){
      $product = $table * $multiplier;
      echo "<tr><td>";
      echo $table . " times " . $multiplier . " = " . $product;
      echo "</td></tr>";
      }
   echo "</table><br />";
   }
?>
WinXP Home SP2
XAMPP 1.5.1 in top-level directory
Unzipped directly from .zip file
no other severs running
CPcoder
 
Posts: 30
Joined: 16. February 2006 08:44

HERE'S MY CONFIG FILE httpd.conf

Postby CPcoder » 22. February 2006 23:28

Code: Select all
#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned. 
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/xampp/apache" will be interpreted by the
# server as "/xampp/apache/logs/foo.log".
#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
# If a drive letter is omitted, the drive on which Apache.exe is located
# will be used by default.  It is recommended that you always supply
# an explicit drive letter in absolute paths, however, to avoid
# confusion.
#

# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum  number of requests a server process serves
ThreadsPerChild 250
MaxRequestsPerChild  0

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk.  If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
ServerRoot "/xampp/apache"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
# MYCHANGE: SWITCHED TO PORT 8080; DIDN'T HELP WINDOWS ERROR
#Listen 12.34.56.78:80
Listen 8080

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
#LoadModule autoindex_module modules/mod_autoindex.so # don't load because of mod_autoindex_color.so
#LoadModule bucketeer_module modules/mod_bucketeer.so
#LoadModule cache_module modules/mod_cache.so
#LoadModule disk_cache_module modules/mod_disk_cache.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule mem_cache_module modules/mod_mem_cache.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule charset_lite_module modules/mod_charset_lite.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
#LoadModule dumpio_module modules/mod_dumpio.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
#LoadModule headers_module modules/mod_headers.so
#LoadModule ident_module modules/mod_ident.so
#LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule ldap_module modules/mod_ldap.so
#LoadModule logio_module modules/mod_logio.so
LoadModule log_config_module modules/mod_log_config.so
#LoadModule log_forensic_module modules/mod_log_forensic.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
#LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule version_module modules/mod_version.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule ssl_module modules/mod_ssl.so

LoadModule autoindex_color_module modules/mod_autoindex_color.so
#LoadModule mysql_auth_module modules/mod_auth_mysql.so
#LoadModule auth_remote_module modules/mod_auth_remote.so
#LoadModule sspi_auth_module modules/mod_auth_sspi.so
#LoadModule log_sql_module modules/mod_log_sql.so
#LoadModule log_sql_mysql_module modules/mod_log_sql_mysql.so
#<IfModule ssl_module>
#    LoadModule log_sql_ssl_module modules/mod_log_sql_ssl.so
#</IfModule>
#LoadModule proxy_html_module modules/mod_proxy_html.so
#LoadModule xmlns_module modules/mod_xmlns.so
#LoadModule proxy_xml_module modules/mod_proxy_xml.so
#LoadModule bw_module modules/mod_bw.so

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
# MYCHANGE: (MY REAL CONFIG HAS MY REAL EMAIL, OF COURSE!)
ServerAdmin fakeemail@fakeserver.com

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# MYCHANGE: SWITCHED TO PORT 8080; DIDN'T HELP WINDOWS ERROR
ServerName localhost:8080

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/xampp/htdocs"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features. 
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/xampp/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks Includes ExecCGI

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
</FilesMatch>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    CustomLog logs/access.log common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    #CustomLog logs/access.log combined
</IfModule>

<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to
    # exist in your server's namespace, but do not anymore. The client
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "/xampp/cgi-bin/"

</IfModule>

#
# "/xampp/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/xampp/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

#
# Apache parses all CGI scripts for the shebang line by default.
# This comment line, the first line of the script, consists of the symbols
# pound (#) and exclamation (!) followed by the path of the program that
# can execute this specific script.  For a perl script, with perl.exe in
# the C:\Program Files\Perl directory, the shebang line should be:

   #!c:/program files/perl/perl

# Note you _must_not_ indent the actual shebang line, and it must be the
# first line of the file.  Of course, CGI processing must be enabled by
# the appropriate ScriptAlias or Options ExecCGI directives for the files
# or directory in question.
#
# However, Apache on Windows allows either the Unix behavior above, or can
# use the Registry to match files by extention.  The command to execute
# a file of this type is retrieved from the registry by the same method as
# the Windows Explorer would use to handle double-clicking on a file.
# These script actions can be configured from the Windows Explorer View menu,
# 'Folder Options', and reviewing the 'File Types' tab.  Clicking the Edit
# button allows you to modify the Actions, of which Apache 1.3 attempts to
# perform the 'Open' Action, and failing that it will try the shebang line.
# This behavior is subject to change in Apache release 2.0.
#
# Each mechanism has it's own specific security weaknesses, from the means
# to run a program you didn't intend the website owner to invoke, and the
# best method is a matter of great debate.
#
# To enable the this Windows specific behavior (and therefore -disable- the
# equivilant Unix behavior), uncomment the following directive:
#
#ScriptInterpreterSource registry
#
# The directive above can be placed in individual <Directory> blocks or the
# .htaccess file, with either the 'registry' (Windows behavior) or 'script'
# (Unix behavior) option, and will override this server default option.
#

#
# DefaultType: the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig conf/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    AddHandler cgi-script .cgi

    # For files that include their own HTTP headers:
    #AddHandler send-as-is asis

    # For server-parsed imagemap files:
    #AddHandler imap-file map

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    # MYCHANGE: UNCOMMENTED SO I CAN USE SSI AND ADDED .pthml
    AddType text/html .shtml .phtml
    AddOutputFilter INCLUDES .shtml .phtml
</IfModule>

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile conf/magic

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall is used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
#
#EnableMMAP off
#EnableSendfile off

# Supplemental configuration
#
# The configuration files in the conf/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.

# XAMPP specific settings
Include conf/extra/httpd-xampp.conf

# Server-pool management (MPM specific)
# Include conf/extra/httpd-mpm.conf

# Multi-language error messages
Include conf/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
Include conf/extra/httpd-autoindex.conf

# Language settings
Include conf/extra/httpd-languages.conf

# User home directories
Include conf/extra/httpd-userdir.conf

# Real-time info on requests and configuration
Include conf/extra/httpd-info.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
Include conf/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
Include conf/extra/httpd-dav.conf

# Various default settings
Include conf/extra/httpd-default.conf

# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
WinXP Home SP2
XAMPP 1.5.1 in top-level directory
Unzipped directly from .zip file
no other severs running
CPcoder
 
Posts: 30
Joined: 16. February 2006 08:44

TODAY'S CONTENTS OF error.log

Postby CPcoder » 22. February 2006 23:32

I only included today so as not to accidentally include any errors before my config file was correct.

Code: Select all
[Wed Feb 22 16:23:54 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 16:23:54 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 16:23:55 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 16:23:55 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 16:24:00 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1 configured -- resuming normal operations
[Wed Feb 22 16:24:00 2006] [notice] Server built: Dec  1 2005 18:36:53
[Wed Feb 22 16:24:00 2006] [notice] Parent: Created child process 2080
[Wed Feb 22 16:24:02 2006] [notice] Child 2080: Child process is running
[Wed Feb 22 16:24:02 2006] [notice] Child 2080: Acquired the start mutex.
[Wed Feb 22 16:24:02 2006] [notice] Child 2080: Starting 250 worker threads.
[Wed Feb 22 16:24:02 2006] [notice] Child 2080: Starting thread to listen on port 8080.
[Wed Feb 22 16:24:02 2006] [notice] Child 2080: Starting thread to listen on port 443.
[Wed Feb 22 16:30:01 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 16:30:01 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 16:30:02 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 16:30:02 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 16:30:07 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1 configured -- resuming normal operations
[Wed Feb 22 16:30:07 2006] [notice] Server built: Dec  1 2005 18:36:53
[Wed Feb 22 16:30:07 2006] [notice] Parent: Created child process 3540
[Wed Feb 22 16:30:10 2006] [notice] Child 3540: Child process is running
[Wed Feb 22 16:30:10 2006] [notice] Child 3540: Acquired the start mutex.
[Wed Feb 22 16:30:10 2006] [notice] Child 3540: Starting 250 worker threads.
[Wed Feb 22 16:30:10 2006] [notice] Child 3540: Starting thread to listen on port 8080.
[Wed Feb 22 16:30:10 2006] [notice] Child 3540: Starting thread to listen on port 443.
[Wed Feb 22 16:34:58 2006] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Wed Feb 22 16:35:19 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 16:35:19 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 16:35:22 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1 configured -- resuming normal operations
[Wed Feb 22 16:35:22 2006] [notice] Server built: Dec  1 2005 18:36:53
[Wed Feb 22 16:35:22 2006] [notice] Parent: Created child process 2716
[Wed Feb 22 16:35:27 2006] [notice] Child 2716: Child process is running
[Wed Feb 22 16:35:27 2006] [notice] Child 2716: Acquired the start mutex.
[Wed Feb 22 16:35:27 2006] [notice] Child 2716: Starting 250 worker threads.
[Wed Feb 22 16:35:27 2006] [notice] Child 2716: Starting thread to listen on port 8080.
[Wed Feb 22 16:35:27 2006] [notice] Child 2716: Starting thread to listen on port 443.
[Wed Feb 22 16:36:02 2006] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Wed Feb 22 16:36:28 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 16:36:28 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 16:36:47 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1 configured -- resuming normal operations
[Wed Feb 22 16:36:47 2006] [notice] Server built: Dec  1 2005 18:36:53
[Wed Feb 22 16:36:47 2006] [notice] Parent: Created child process 3416
[Wed Feb 22 16:37:21 2006] [notice] Child 3416: Child process is running
[Wed Feb 22 16:37:22 2006] [notice] Child 3416: Acquired the start mutex.
[Wed Feb 22 16:37:22 2006] [notice] Child 3416: Starting 250 worker threads.
[Wed Feb 22 16:37:22 2006] [notice] Child 3416: Starting thread to listen on port 8080.
[Wed Feb 22 16:37:22 2006] [notice] Child 3416: Starting thread to listen on port 443.
[Wed Feb 22 16:42:43 2006] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Wed Feb 22 16:42:55 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 16:42:55 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 16:42:59 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1 configured -- resuming normal operations
[Wed Feb 22 16:42:59 2006] [notice] Server built: Dec  1 2005 18:36:53
[Wed Feb 22 16:42:59 2006] [notice] Parent: Created child process 1656
[Wed Feb 22 16:43:16 2006] [notice] Child 1656: Child process is running
[Wed Feb 22 16:43:16 2006] [notice] Child 1656: Acquired the start mutex.
[Wed Feb 22 16:43:16 2006] [notice] Child 1656: Starting 250 worker threads.
[Wed Feb 22 16:43:17 2006] [notice] Child 1656: Starting thread to listen on port 8080.
[Wed Feb 22 16:43:17 2006] [notice] Child 1656: Starting thread to listen on port 443.
[Wed Feb 22 16:50:24 2006] [error] [client 127.0.0.1] File does not exist: C:/xampp/htdocs/tery
[Wed Feb 22 16:51:53 2006] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Wed Feb 22 16:52:09 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 16:52:09 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 16:52:13 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1 configured -- resuming normal operations
[Wed Feb 22 16:52:13 2006] [notice] Server built: Dec  1 2005 18:36:53
[Wed Feb 22 16:52:13 2006] [notice] Parent: Created child process 1684
[Wed Feb 22 16:52:19 2006] [notice] Child 1684: Child process is running
[Wed Feb 22 16:52:20 2006] [notice] Child 1684: Acquired the start mutex.
[Wed Feb 22 16:52:20 2006] [notice] Child 1684: Starting 250 worker threads.
[Wed Feb 22 16:52:20 2006] [notice] Child 1684: Starting thread to listen on port 8080.
[Wed Feb 22 16:52:20 2006] [notice] Child 1684: Starting thread to listen on port 443.
[Wed Feb 22 16:59:01 2006] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Wed Feb 22 16:59:19 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 16:59:19 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 16:59:22 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1 configured -- resuming normal operations
[Wed Feb 22 16:59:22 2006] [notice] Server built: Dec  1 2005 18:36:53
[Wed Feb 22 16:59:22 2006] [notice] Parent: Created child process 3940
[Wed Feb 22 16:59:27 2006] [notice] Child 3940: Child process is running
[Wed Feb 22 16:59:28 2006] [notice] Child 3940: Acquired the start mutex.
[Wed Feb 22 16:59:28 2006] [notice] Child 3940: Starting 250 worker threads.
[Wed Feb 22 16:59:28 2006] [notice] Child 3940: Starting thread to listen on port 8080.
[Wed Feb 22 16:59:28 2006] [notice] Child 3940: Starting thread to listen on port 443.
[Wed Feb 22 17:01:57 2006] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Wed Feb 22 17:02:12 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 17:02:12 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 17:02:15 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1 configured -- resuming normal operations
[Wed Feb 22 17:02:15 2006] [notice] Server built: Dec  1 2005 18:36:53
[Wed Feb 22 17:02:15 2006] [notice] Parent: Created child process 2840
[Wed Feb 22 17:02:20 2006] [notice] Child 2840: Child process is running
[Wed Feb 22 17:02:20 2006] [notice] Child 2840: Acquired the start mutex.
[Wed Feb 22 17:02:20 2006] [notice] Child 2840: Starting 250 worker threads.
[Wed Feb 22 17:02:20 2006] [notice] Child 2840: Starting thread to listen on port 8080.
[Wed Feb 22 17:02:20 2006] [notice] Child 2840: Starting thread to listen on port 443.
[Wed Feb 22 17:05:18 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 17:05:18 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 17:05:18 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 17:05:19 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 17:05:21 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1 configured -- resuming normal operations
[Wed Feb 22 17:05:21 2006] [notice] Server built: Dec  1 2005 18:36:53
[Wed Feb 22 17:05:21 2006] [notice] Parent: Created child process 1652
[Wed Feb 22 17:05:23 2006] [notice] Child 1652: Child process is running
[Wed Feb 22 17:05:23 2006] [notice] Child 1652: Acquired the start mutex.
[Wed Feb 22 17:05:23 2006] [notice] Child 1652: Starting 250 worker threads.
[Wed Feb 22 17:05:23 2006] [notice] Child 1652: Starting thread to listen on port 443.
[Wed Feb 22 17:05:23 2006] [notice] Child 1652: Starting thread to listen on port 8080.
[Wed Feb 22 17:06:34 2006] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Wed Feb 22 17:06:58 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 17:06:58 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 17:07:01 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1 configured -- resuming normal operations
[Wed Feb 22 17:07:01 2006] [notice] Server built: Dec  1 2005 18:36:53
[Wed Feb 22 17:07:01 2006] [notice] Parent: Created child process 2392
[Wed Feb 22 17:07:09 2006] [notice] Child 2392: Child process is running
[Wed Feb 22 17:07:09 2006] [notice] Child 2392: Acquired the start mutex.
[Wed Feb 22 17:07:09 2006] [notice] Child 2392: Starting 250 worker threads.
[Wed Feb 22 17:07:09 2006] [notice] Child 2392: Starting thread to listen on port 8080.
[Wed Feb 22 17:07:09 2006] [notice] Child 2392: Starting thread to listen on port 443.
[Wed Feb 22 17:14:23 2006] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Wed Feb 22 17:14:35 2006] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Wed Feb 22 17:14:35 2006] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Wed Feb 22 17:14:38 2006] [notice] Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.1 configured -- resuming normal operations
[Wed Feb 22 17:14:38 2006] [notice] Server built: Dec  1 2005 18:36:53
[Wed Feb 22 17:14:38 2006] [notice] Parent: Created child process 3776
[Wed Feb 22 17:14:43 2006] [notice] Child 3776: Child process is running
[Wed Feb 22 17:14:44 2006] [notice] Child 3776: Acquired the start mutex.
[Wed Feb 22 17:14:44 2006] [notice] Child 3776: Starting 250 worker threads.
[Wed Feb 22 17:14:44 2006] [notice] Child 3776: Starting thread to listen on port 443.
[Wed Feb 22 17:14:44 2006] [notice] Child 3776: Starting thread to listen on port 8080.
WinXP Home SP2
XAMPP 1.5.1 in top-level directory
Unzipped directly from .zip file
no other severs running
CPcoder
 
Posts: 30
Joined: 16. February 2006 08:44

Postby CPcoder » 23. February 2006 00:53

In This post I found reference to this FAQ question. It says to uncomment this line in httpd.conf:
Code: Select all
Win32DisableAcceptEx
The problem is that line does not exist in my httpd.conf! In fact, the entire section under "<IfModule mpm_winnt_module>" section doesn't exist!

But it exists in oldhttpd.conf. I didn't remove it from httpd.conf myself...I thought those files were identical until you changed httpd.conf (to force you to have a backup). Am I wrong? Do I need to paste the entire "<IfModule mpm_winnt_module>" section into httpd.conf?

Or am I wrong, does this have nothing to do with my problem, and I don't need it? I'm running XP Home. I don't have any other servers installed, or anything that needs to use port 80 (that I'm aware of).

Sorry I'm posting so much information, but I really don't know what the problem is, I'm trying to give you anything which may help. There seem to be several errors in the error log, the one that seems to be significant is "[notice] Parent: child process exited with status 3221225477 -- Restarting.", not that I would know what's significant. I'll rename this thread accordingly. I have searched and tried all other suggestions that could be related, and I'm at my wit's end.
WinXP Home SP2
XAMPP 1.5.1 in top-level directory
Unzipped directly from .zip file
no other severs running
CPcoder
 
Posts: 30
Joined: 16. February 2006 08:44

Postby Wiedmann » 23. February 2006 01:50

The problem is that line does not exist in my httpd.conf! In fact, the entire section under "<IfModule mpm_winnt_module>" section doesn't exist!

You can add this directive to "\xampp\apache\conf\extra\httpd-mpm.conf" between line 63 - 66 ("<IfModule mpm_winnt_module> ... </IfModule>").

BTW:
Why did you use PHP via a SSI include virtual?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby CPcoder » 23. February 2006 02:05

Wiedmann wrote:
The problem is that line does not exist in my httpd.conf! In fact, the entire section under "<IfModule mpm_winnt_module>" section doesn't exist!

You can add this directive to "\xampp\apache\conf\extra\httpd-mpm.conf" between line 63 - 66 ("<IfModule mpm_winnt_module> ... </IfModule>").


Then maybe this FAQ page needs to be corrected, it says to do this in httpd.conf?

AF FAQ wrote:My CPU load is with the Apache almost by 99%

Please, enable following line = > # Win32DisableAcceptEx in the /xampp/Apache/conf/httpd.conf.

In this case correct is: Win32DisableAcceptEx



Wiedmann wrote:Why did you use PHP via a SSI include virtual?


Per this official Apache tutorial on SSI:

apache.org wrote:Including the results of a CGI program

This is one of the more common uses of SSI - to output the results of a CGI program, such as everybody's favorite, a ``hit counter.''

<!--#include virtual="/cgi-bin/counter.pl" -->


This should work fine, it was working before. In fact, it still does work. It is the same way I include the results of a hello-world-type php program. The problem is is, indeed (I just verified about 20 times) the CPU load. I will add the directive to xampp\apache\conf\extra\httpd-mpm.conf between line 63 - 66 as you say.
WinXP Home SP2
XAMPP 1.5.1 in top-level directory
Unzipped directly from .zip file
no other severs running
CPcoder
 
Posts: 30
Joined: 16. February 2006 08:44

Postby CPcoder » 23. February 2006 03:10

I made the change to httpd-mpm.conf as you suggested. CPU usage still shoots to the top when I try to view the HTML page that includes the results of running a PHP script to print the times tables.

I looked in httpd.conf and saw I needed to uncomment a line so that the above file will get read:
Code: Select all
# Server-pool management (MPM specific)
# MYCHANGE: UNCOMMENTED BELOW B/C OF CHANGE TO httpd-mpm.conf B/C OF CPU USE
 Include conf/extra/httpd-mpm.conf


I did remember to stop and start Apache after each change.

Still get "Apache has encountered an error and needs to close". This error/the CPU problem always happens with said page. I made a copy but changed it by pasting the PHP code directly into the HTML page, getting rid of the SSI. That page worked once, but on a 2nd try get the CPU problem/error anyway.

I actually see the CPU usage shoot up in the system monitor about 10 seconds after I click the link. I get the "Apache has encountered a problem and needs to close" about 36 seconds after I click the link. (I have my test PHP pages linked from a "home" page so I can easily switch between them if I want to compare.)

Like I said in a previous post, it occassionally happens even with the page that displays the current date and uses SSI to display the results of a hello world PHP script, just much less often. This is definitely a CPU usage issue, but the recommended fix doesn't help.
WinXP Home SP2
XAMPP 1.5.1 in top-level directory
Unzipped directly from .zip file
no other severs running
CPcoder
 
Posts: 30
Joined: 16. February 2006 08:44

Postby CPcoder » 23. February 2006 03:59

    Just a little more info on the CPU usage/"Apache needs to close" message...

  • Page w/ date & time, simple "hello world" PHP script via SSI: loads pretty much every time, I only had the problem 1 or 2 times, can't recreate today; loads instantly most of the time, sometimes takes a few extra seconds; with a 1-line script, that shouldn't surprize.
  • Page that uses SSI to run a "times tables" PHP script: worked once, on standard Apache install, but not on the XAMPP installation; tried it 4 times just now; error message comes up anywhere from 22 seconds to 36 seconds after I try to load the page.
  • Page with PHP "times tables" script hard-coded into the HTML page: tried it 4 times just now; error message (2 out of 4 times) came up 25 seconds and 35 seconds after I try to load the page; successful page views (2 out of 4 times) took 22 seconds and 25 seconds. (Same script as above page, I just copied from the .php file and pasted into my HTML file.)


Obviously with the CPU issue, longer scripts will show the problem most frequently. I even restarted my computer before doing these last tests.

BTW, I asked in another thread (never got an answer), should I change MaxRequestsPerChild? Right now it is 0 (the default).

In http://httpd.apache.org/docs/2.0/platform/windows.html
apache.org wrote:MaxRequestsPerChild: Like the Unix directive, this controls how many requests a single child process will serve before exiting. However, unlike on Unix, a single process serves all the requests at once, not just one. If this is set, it is recommended that a very high number is used. The recommended default, MaxRequestsPerChild 0, causes the child process to never exit.


In http://httpd.apache.org/docs/2.0/en/mod/mpm_common.html#maxrequestsperchild
apache.org wrote:MaxRequestsPerChild Directive

Description: Limit on the number of requests that an individual child server will handle during its life
Syntax: MaxRequestsPerChild number
Default: MaxRequestsPerChild 10000
Context: server config
Status: MPM
Module: leader, mpm_netware, mpm_winnt, mpmt_os2, perchild, prefork, threadpool, worker

The MaxRequestsPerChild directive sets the limit on the number of requests that an individual child server process will handle. After MaxRequestsPerChild requests, the child process will die. If MaxRequestsPerChild is 0, then the process will never expire.

Different default values

The default value for mpm_netware and mpm_winnt is 0.

Setting MaxRequestsPerChild to a non-zero limit has two beneficial effects:

* it limits the amount of memory that process can consume by (accidental) memory leakage;
* by giving processes a finite lifetime, it helps reduce the number of processes when the server load reduces.

Note

For KeepAlive requests, only the first request is counted towards this limit. In effect, it changes the behavior to limit the number of connections per child.
WinXP Home SP2
XAMPP 1.5.1 in top-level directory
Unzipped directly from .zip file
no other severs running
CPcoder
 
Posts: 30
Joined: 16. February 2006 08:44

Postby CPcoder » 25. February 2006 02:29

It seems the CPU-load issue is actually a bug in XAMPP that was once fixed on a previous release, then came up again on a newer release. I added my experience to the bug report.

Before I give up on the current version of XAMPP, I hope someone knows...

...do you think it will help to set MaxRequestsPerChild?
...if so, how low/high should I set it?
...or forget about that?
WinXP Home SP2
XAMPP 1.5.1 in top-level directory
Unzipped directly from .zip file
no other severs running
CPcoder
 
Posts: 30
Joined: 16. February 2006 08:44

Postby ccb056 » 07. February 2007 20:52

It looks like a bug in the way apache compiled their program:
Apache 3221225477 Error
ccb056
 
Posts: 3
Joined: 07. February 2007 20:42


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 65 guests