start_aging1(AgeInterval,MaxAge,SelectData) ->
   start_aging1(AgeInterval,MaxAge,SelectData,0).
start_aging1(_AgeInterval,_MaxAge,'$end_of_table',RecsAged) ->
   gen_server:cast(?MODULE,{completed_aging_operation,RecsAged});
start_aging1(_AgeInterval,MaxAge,{Matches,'$end_of_table'},RecsAged) ->
   RecordsAgedCount = age_records(Matches,[],MaxAge*1000000,os:timestamp()),
   gen_server:cast(?MODULE,{completed_aging_operation,RecsAged+RecordsAgedCount});
start_aging1(AgeInterval,MaxAge,{Matches,Continuation},RecsAged) ->
   RecordsAgedCount = age_records(Matches,[],MaxAge*1000000,os:timestamp()),
   timer:sleep(AgeInterval),
   start_aging1(AgeInterval,MaxAge,ets:select(Continuation),RecsAged+RecordsAgedCount).
ets:new(StationIdTableName,[{keypos,2},named_table,public]),
The only odd things I can think of is that during the select records are getting deleted and added. Also, the select operation is run slowly (over 900 seconds)
Again, this isn't every time I get the crash.
Matt
I'll rephrase that. This is my concern from the ets documentation for safe_fixtable/2:
Note that no deleted objects are actually removed from a fixed table until it has been released. If a process fixes a table but never releases it, the memory used by the deleted objects will never be freed. The performance of operations on the table will also degrade significantly.
Is there a potential problem on having a safe_fixtable "active" for long periods of time on a table having lots of inserts and deletes?