A proper way of cleaning up SY_Workstation

SOLVED

Greetings,

Our customer are complaining they have problems with MAS Desktop. They claim that is due to our application activity. Our app uses BOI to have access to sales orders, invoices, customers (read/write). The customer  have to clean up SY_Workstation file manually once in two weeks on average. They are saying that MAS Desktop will just not start, or silently close without doing anything, due to the table maxing out. The number of records in the table is in the neighborhood of high 400s to mid 500s in total.

Our code closes down session gracefully, releases object references.

I heard somebody advising to delete the entire table while nobody is logged in. What we are considering though, is to delete outdated records during session shutdown. The question is how could we distinguish our older sessions from all the others, currently active?

Please advise.

Thanks,
Alex

*** Update:
I emulated multiple session opens/closes. The problem arises when accessing data from multiple workstations (two in the test). Tested with ~650 records in the table.
When tested with one workstation, SY_Workstation table truncated upon MAS Desktop restart, down to 415 records. This is not happening with two workstations, though. Neither could restart due to the error popping up after log in: ‘Record '' is missing from '<Path>\MAS90\MAS_SYSTEM\SY_Workstation.M4T.'.

The issue does not affect our app's ability to work with MAS data.
Tested with Sage 100 Standard ERP 2013 v 5.00.3.0.