Advertisement

10.19.2007 at 06:26AM PDT, ID: 22904369 | Points: 500
[x]
Attachment Details

How do I "permanently" change the data seg size in Mac OSX running apache?

Asked by reedley in Apache Web Server, Mac OS 10.1 (Cheetah)

Tags: Mac OSX with apache, Mac OSX with apache

I'm working with a Mac OS X server running apache, and am getting the following errors in my logs:

[Thu Oct 18 23:44:08 2007] [notice] child pid 23372 exit signal Segmentation fault (11)
httpd(24092) malloc: *** vm_allocate(size=16384) failed (error code=268451844)
httpd(24092) malloc: *** error: can't allocate region
httpd(24092) malloc: *** set a breakpoint in szone_error to debug
FATAL:  erealloc():  Unable to allocate 15352 bytes
httpd(24096) malloc: *** vm_allocate(size=16384) failed (error code=268451844)
httpd(24096) malloc: *** error: can't allocate region
httpd(24096) malloc: *** set a breakpoint in szone_error to debug
FATAL:  erealloc():  Unable to allocate 15352 bytes
httpd(23374) malloc: *** error for object 0x25c0000: Can't deallocate_pages region
httpd(23374) malloc: *** set a breakpoint in szone_error to debug
[Fri Oct 19 02:07:35 2007] [notice] child pid 24549 exit signal Bus error (10)
httpd(23374) malloc: *** vm_allocate(size=20480) failed (error code=-301)
httpd(23374) malloc: *** error: can't allocate region
httpd(23374) malloc: *** set a breakpoint in szone_error to debug
[Fri Oct 19 02:16:04 2007] [notice] child pid 23374 exit signal Segmentation fault (11)


When I check the limits for the server, I get this:
ulimit -a
core file size        (blocks, -c) 0
data seg size         (kbytes, -d) 6144
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) unlimited
max memory size       (kbytes, -m) unlimited
open files                    (-n) 256
pipe size          (512 bytes, -p) 1
stack size            (kbytes, -s) 8192
cpu time             (seconds, -t) unlimited
max user processes            (-u) 100
virtual memory        (kbytes, -v) unlimited


Here are some settings for my.cnf

[mysqld]
port            = 3306
socket            = /var/mysql/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 64M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

query_cache_limit = 32M
max_heap_table_size = 32M
long_query_time = 5
log_slow_queries = /var/log/mysql-slow.log
skip-thread-priority

My question is, how do I change the data seg size?  I can change it temporarily with ulimit -d, but this change is lost when my Putty session ends.  I've looked at some online forums, and I think I need to set something up in System/Library/StartUpItems, but I don't know what to change or add in this directory.  Also, do you see something else that I might change or look for?  Will I need to reboot the server (or apache?) to implement the changes?

Thanks for your consideration or this problem.

Start Free Trial
[+][-]10.19.2007 at 02:32PM PDT, ID: 20112574

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.19.2007 at 10:52PM PDT, ID: 20113917

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.20.2007 at 02:16AM PDT, ID: 20114238

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.21.2007 at 04:41PM PDT, ID: 20119693

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 05:16AM PDT, ID: 20122473

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 06:50AM PDT, ID: 20123059

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 08:58AM PDT, ID: 20124133

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.22.2007 at 09:40AM PDT, ID: 20124547

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2007 at 09:58AM PDT, ID: 20132495

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.23.2007 at 11:44PM PDT, ID: 20136711

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • Automotive
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Displays / Monitors
  • Handhelds / PDAs
  • Components
  • Peripherals
  • Laptops/Notebooks
  • Servers
  • Misc
  • Apple
  • Embedded Hardware
  • Networking Hardware
  • Storage
  • Desktops
  • New Users
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMware
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Virtualization
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • Web Computing
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Consulting
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMware
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Automation
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Web Services
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Web Computing
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Lounge
  • Business Travel
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
  • Automotive
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
10.19.2007 at 02:32PM PDT, ID: 20112574
You have memory leak in your code.
You can hide this by setting requests per child process in httpd.conf
Another option is reading through malloc manual page to look what is wrong

Output of httpd -V and uname -a will become handy really soon.
 
10.19.2007 at 10:52PM PDT, ID: 20113917
So how do I find the memory leak?  
MaxRequestsPerChild is already set to 100000
 
10.20.2007 at 02:16AM PDT, ID: 20114238
Look at modules you use. Its inside. Can I get any idea of what modules are loaded in apache? OS version? Apache version (1.x or 2.x at least)
 
10.21.2007 at 04:41PM PDT, ID: 20119693
The OS version is Darwin 8.10.0.

You can see more at:  http://www.mvhs.fuhsd.org/info.php,  and you can see the initial page load at:
http://www.mvhs.fuhsd.org/
The site is managed with the CMS phpWebSite 0.10

By the way, I have also noticed that in the system log, I am getting the following errors:

Oct 21 16:37:14 mvhsweb servermgrd: servermgr_dns: more than one name for the primary IP address, unable to pick one
Oct 21 16:37:14 mvhsweb servermgrd: servermgr_dns: no hostname set and unable to detect via DNS, services may not function properly - use changeip to repair
Oct 21 16:37:15 mvhsweb kernel[0]: nfs server automount -fstab [206]: not responding
Oct 21 16:37:33 mvhsweb kernel[0]: nfs server automount -fstab [206]: not responding
Oct 21 16:37:46 mvhsweb kernel[0]: nfs server automount -fstab [206]: not responding
Oct 21 16:38:04 mvhsweb kernel[0]: nfs server automount -fstab [206]: not responding
 
10.22.2007 at 05:16AM PDT, ID: 20122473
Please post APACHE VERSION httpd -V
kernel error is irreleavant to memory management.
 
10.22.2007 at 06:50AM PDT, ID: 20123059
apache version is 1.3.33

From the info.php (mentioned above):
Apache/1.3.33 (Darwin) mod_ssl/2.8.24 OpenSSL/0.9.7l PHP/4.4.7 mod_perl/1.29
 
10.22.2007 at 08:58AM PDT, ID: 20124133
Sorry, got the OS Server version wrong: here it is with other hardware info

ProductName:    Mac OS X Server
ProductVersion: 10.4.10
BuildVersion:   8R218    

Hardware Overview:
      Machine Name: Xserve G5
      Machine Model: RackMac3,1
      CPU Type: PowerPC G5  (3.0)
      Number Of CPUs: 2
      CPU Speed: 2 GHz
      L2 Cache (per CPU): 512 KB
      Memory: 2 GB
      Bus Speed: 1 GHz
      Boot ROM Version: 5.1.7f1
      Serial Number: QP4340C9PNK
 
10.23.2007 at 09:58AM PDT, ID: 20132495
Not quite sure where to get started.  I've looked at the man page, but don't know what to do with it.  How do I use malloc to look for memory leaks?
 
10.23.2007 at 11:44PM PDT, ID: 20136711
There are malloc parameters to track down problems and "leaks" utility down there that looks for leaks.
 
 
20080716-EE-VQP-32 / EE_QW_2_20070628