The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Out of Memory exception in VW 7.2

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Out of Memory exception in VW 7.2 Posted: Jan 8, 2004 8:37 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Out of Memory exception in VW 7.2
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement
I'm noticing that developers are reporting an "out of memory" exception in VW 7.2, with no idea how they are getting it (typically at image start). Here's the likely cause - Loading the VisualWave (Web Toolkit) server and not resetting ObjectMemory policies. In 7.2, loading the server resets the memory settings in a way that is appropriate to a server with lots of memory - but not necessarily for a client. Try this:
  • load WebToolkit
  • Now execute ObjectMemory sizesAtStartup

You'll see something like this: #(10.0 10.0 250.0 1.0 1.0 5.0 1.0). Look carefully at that third value - 250.0. What these numbers represent are multipliers - how much bigger to make a specific segment of VW's Object Memory at startup. That third one is LargeSpace. The reason it's been expanded has to do with appropriate sizes of socket buffers in a web application system. If you save your image in this state, it will try to allocate 250X of the third value returned by ObjectMemory defaultSizesAtStartup (204,800 bytes on my Windows box). That means that your system is going to ask for a lot of RAM (51MB on my system) for LargeSpace at startup. The exception means that the OS wouldn't yield up that much RAM to your process.

The solution? For development, do something like this before saving your image: ObjectMemory sizesAtStartup: #(10.0 10.0 10.0 1.0 1.0 5.0 1.0). Save your image, and you'll have more reasonable defaults for a development system. For a deployed server, the 250x may be more appropriate, but that depends on the specific configuration (RAM, swap space, etc) of your server - check the class comment and class side documentation of ObjectMemory for details

Read: Out of Memory exception in VW 7.2

Topic: Some dev stream changes in Bf Previous Topic   Next Topic Topic: WebServices = RPC redux

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use