Opened 17 years ago

Closed 12 years ago

#520 closed defect (fixed)

Out of memory. bad allocation Errors using Tiled Map

Reported by: zspitzer Owned by:
Priority: medium Milestone:
Component: Tile Service Version: 2.1.0
Severity: major Keywords: out of memory, #480
Cc: walt.welton-lair@… External ID:

Description

Following some errors like

Error: Failed to stylize layer: SEAS

An unclassified exception occurred.

I then see this error in the log file, following which the server becomes unresponsive and the service can't be stopped (using windows 2003 & SDF files )

<2008-03-26T17:21:47> Administrator

Error: Out of memory.

bad allocation

StackTrace:

bad allocation

Change History (10)

comment:1 by trevorwekel, 17 years ago

Hi Zac,

Which build of MapGuide are you using? Does your map have SDF layers only? Would you be able to provide an mgp package for the defect?

comment:2 by zspitzer, 17 years ago

the map is using purely SDF layers using mg 2.00 on w2k3, I'll try and create a sample mgp to reproduce it.

i have been running the server interactively of late, i'm not sure if it's directly related but i found this on the console this morning

(6544) Out of memory. bad allocation Exception occurred in method MgServerSelectFeatures.SelectFeatures at line 249 i n file d:\buildforgeprojects\mapguide_open_source_v2.0\build_23.8\mgdev\server\s rc\services\feature\ServerSelectFeatures.cpp

(8140) Out of memory. bad allocation Exception occurred in method MgServerSelectFeatures.SelectFeatures at line 249 i n file d:\buildforgeprojects\mapguide_open_source_v2.0\build_23.8\mgdev\server\s rc\services\feature\ServerSelectFeatures.cpp

kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgefec: fatal error 0 kgepop: no error frame to pop to for error 21503 kgefec: fatal error 0 kgepop: no error frame to pop to for error 21503 kgepop: no error frame to pop to for error 21503 kgepop: no error frame to pop to for error 21503 kgefec: fatal error 0 kgepop: no error frame to pop to for error 21503

comment:3 by zspitzer, 16 years ago

still getting this on 2.0.1... just using managed SDF's and SHP's

I have changed both providers to be pooled...

I gets lots of these type of errors.... the dataset for the map is big, all of Australia...

 Error: Out of memory.
        bad allocation
 StackTrace:
  - MgTileServiceHandler.ProcessOperation line 83 file d:\buildforgeprojects\mapguide_open_source_v2.0\build_27.13\mgdev\server\src\services\tile\TileServiceHandler.cpp
  - MgOpGetTile.Execute line 150 file d:\buildforgeprojects\mapguide_open_source_v2.0\build_27.13\mgdev\server\src\services\tile\OpGetTile.cpp
  - MgServerTileService.GetTile line 263 file d:\buildforgeprojects\mapguide_open_source_v2.0\build_27.13\mgdev\server\src\services\tile\ServerTileService.cpp
  - MgByteSink::ToFile line 245 file d:\buildforgeprojects\mapguide_open_source_v2.0\build_27.13\mgdev\common\foundation\Data/ByteSink.cpp	Out of memory.
bad allocation

 Error: Failed to stylize layer: Apr 08-ABORIG_SA
        An exception occurred in FDO component.
        SDF spatial index error. 
 StackTrace:
  - MgMappingUtil.StylizeLayers line 775 file d:\buildforgeprojects\mapguide_open_source_v2.0\build_27.13\mgdev\server\src\services\mapping\MappingUtil.cpp	Failed to stylize layer: Apr 08-ABORIG_SA
An exception occurred in FDO component.

comment:4 by zspitzer, 16 years ago

Resolution: fixed
Status: newclosed

It looks like this problem was fixed in 2.0.2, I ran a tiling test last night and mapguide stayed up and running for 10 hours under heavy load without a single error.

comment:5 by zspitzer, 16 years ago

Resolution: fixed
Status: closedreopened
Version: 2.0.02.0.2

Just got the same error with 2.0.2, the tiler ran on for a while, after which there was a lot of lck file errors and the crashed but still running mapguide process had lots of png files left locked open

comment:6 by uvlite, 16 years ago

Cc: walt.welton-lair@… added
Keywords: out of memory added
Milestone: 2.1
Version: 2.0.22.1.0

I also observed this problem on revision 3767. That's last Fridays 27 march 2009 trunk checkout!! This was a release build using a FDO rev 4507 from the same day .... Sheboygan works fine..... 9 parallel requests from a tiled map are enough to through the server over e.g. it stops processing any further requests

comment:7 by uvlite, 16 years ago

Keywords: #480 added

This error seems to be caused by a missing cleanup in ByteSink?.cpp:246 in MgByteSink::ToFile?(CREFSTRING filename) In this method a huge buffer (1MB) is allocated to export the byteSource into the given filename. This is the first place when a system with exhausted memory resources fails. The buffer is on the stack so thats not the problem, but when an exception is triggered we are left with an empty file. Thus a MgInvalidStreamHeaderException? on the client side.

This seems to be related to ticket #480.

comment:8 by waltweltonlair, 16 years ago

Partial fix submitted in the trunk stream - see https://trac.osgeo.org/mapguide/changeset/3787.

comment:9 by waltweltonlair, 16 years ago

If memory use is gradually increasing during tile generation then we still need to track down the reason for this.

comment:10 by jng, 12 years ago

Resolution: fixed
Status: reopenedclosed

Closing due to ticket inactivity

Note: See TracTickets for help on using tickets.