[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] "Unable to allocate" problem on raq4
- Subject: [cobalt-users] "Unable to allocate" problem on raq4
- From: Abel Gonzalez <infohostal@xxxxxxxxxxxxxx>
- Date: Thu Jan 8 04:05:03 2004
- Organization:
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
Hi, this is my first message to the list so i am trying to be as
specific as I can.
My RAQ4 is hanging every 7 days, more or less... When it hangs i can
ping but i cannot get http, ftp, ssh etc. Rebooting solves the problem
every time, but i am worried because i think it is a memory leak or
something similar. Looking the logs the only error i see is in the error
log of apache:
FATAL: erealloc(): Unable to allocate 15360 bytes
FATAL: erealloc(): Unable to allocate 245760 bytes
[Thu Jan 8 04:20:54 2004] [error] (32)Broken pipe: accept: (client
socket)
[Thu Jan 8 04:20:54 2004] [error] (32)Broken pipe: accept: (client
socket)
FATAL: emalloc(): Unable to allocate 48 bytes
Ouch! malloc failed in malloc_block()
FATAL: erealloc(): Unable to allocate 15360 bytes
Well, i have a lot of lines about "unable to allocate" when the box
hungs. My box has 128MB RAM, i understand it should be enough for
serving 30000pages/day, the most are php scripts.
I have:
php 4.0.6
mysql 3.23.54 for pc-linux on i586
apache
--------------
Server version: Apache/1.3.20 Sun Cobalt (Unix)
Server built: Apr 4 2003 16:03:06
Server's Module Magic Number: 19990320:10
Server compiled with....
-D EAPI
-D HAVE_MMAP
-D HAVE_SHMGET
-D USE_SHMGET_SCOREBOARD
-D USE_MMAP_FILES
-D USE_SYSVSEM_SERIALIZED_ACCEPT
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="/var/run/httpd.scoreboard"
-D DEFAULT_LOCKFILE="/var/run/httpd.lock"
-D DEFAULT_XFERLOG="/var/log/httpd/access_log"
-D DEFAULT_ERRORLOG="/var/log/httpd/error_log"
-D TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
-D ACCESS_CONFIG_FILE="conf/access.conf"
-D RESOURCE_CONFIG_FILE="conf/srm.conf"
the box is also running awstats.
When i compare the requests for apache during the memory error
all the php scripts should be ok, as i have do some profiling and they
are ok. They were working on another box without problem.
Some hint? it could be a PHP version speficic problem? I have been
looking in the list for a similar problem and the only thing i read is
to try a RAM upgrade. Should i do that or you know another solution?
Thank you very much for your support.
El lun, 05 de 01 de 2004 a las 20:54, Greg Hewitt-Long escribió:
> I just installed mod_gzip onto a test box (one we're running webyourbusiness.com on) - I'm wondering if there are any implication on logfile processing for either RAQ inbuilt stats, or webalizer stats from the following installation.... here are my installation instructions in the form of a "how-to". Anyone can publish this how-to information on their site under the condition they link back to WebYourBusiness.com with credit to me (Greg Hewitt-Long).
>
>
>
> Instructions for installation of mod_zip.so into Apache 1.3 installation - from source compilation method (most reliable)
>
> ssh onto you box -
>
> wget http://heanet.dl.sourceforge.net/sourceforge/mod-gzip/mod_gzip-1.3.26.1a.tgz
> gunzip mod_gzip-1.3.26.1a.tgz
> tar xvf mod_gzip-1.3.26.1a.tar
> cd mod_gzip-1.3.26.1a
> #edit Makefile if your path to set the correct path to apxs - it was /usr/local/bin/apxs - mine was /usr/sbin/apxs
>
> make
>
> # copy the resulting .so file to your apache modules folder (mine was /usr/lib/apache/) - you should find a lot of .so file there
>
> cp mod_gzip.so /usr/lib/apache/
>
> # edit the apache httpd.conf
>
>
> PUT EVERYTHING UNTIL _THE_END_ INTO YOUR HTTPD.CONF
> # GHL - mod_gzip - code begins
> LoadModule gzip_module modules/mod_gzip.so
> <IfModule mod_gzip.c>
> mod_gzip_on Yes
> mod_gzip_can_negotiate Yes
> mod_gzip_static_suffix .gz
> AddEncoding gzip .gz
> mod_gzip_update_static No
> mod_gzip_command_version '/mod_gzip_status'
> mod_gzip_keep_workfiles No
> mod_gzip_minimum_file_size 500
> mod_gzip_maximum_file_size 500000
> mod_gzip_maximum_inmem_size 60000
> mod_gzip_min_http 1000
> mod_gzip_handle_methods GET POST
> mod_gzip_item_exclude reqheader "User-agent: Mozilla/4.0[678]"
> mod_gzip_item_include file \.html$
> mod_gzip_item_exclude file \.js$
> mod_gzip_item_exclude file \.css$
> mod_gzip_item_include file \.pl$
> mod_gzip_item_include handler ^cgi-script$
> mod_gzip_item_include mime ^text/html$
> mod_gzip_item_include mime ^text/plain$
> mod_gzip_item_include mime ^httpd/unix-directory$
> mod_gzip_item_exclude mime ^image/
> mod_gzip_dechunk Yes
> LogFormat "%h %l %u %t \"%V %r\" %<s %b mod_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n -< Out:%{mod_gzip_output_size}n = %{mod_gzip_compression_ratio}n pct." common_with_mod_gzip_info2
> CustomLog logs/mod_gzip.log common_with_mod_gzip_info2
> mod_gzip_add_header_count Yes
> mod_gzip_send_vary Yes
> </IfModule>
>
> # GHL - mod_gzip - code ends
> _THE_END_
>
> # restart apache
>
> /usr/sbin/httpd restart
>
> # Test your GZIP compression at:
>
> # http://leknor.com/code/gziped.php