FoxWeb uses an intelligent algorithm to re-use records in the _fwsession table and also packs this table on startup.
Session variables are stored in memo fields in _fwsession. Each user's session is stored in a separate record and all session variables are stored in a single memo field, using the SAVE MEMO statement.
As you may know, in VFP, whenever the contents of a memo field are altered, the space occupied by the previous contents in the FPT file is not released, but rather, additional space is allocated for the new contents. The old space is simply left in the file and marked as unused. This space is not reclaimed, until the table is packed.
What this means is that, if even a single session variable is changed in a particular request, the entire memo field, holding all session variables for the current user, is affected and the space occupied by the memo field is doubled. In general this should not be much of a problem with regard to performance, but it does cause the consumption large amounts of hard-drive space. I recommend the following:
Sent by jc clerc on 06/17/2008 12:14:12 AM:
Is there a way to kill definitly terminated session from the _fwsession files, I end up with 400 MB even 1 Giga !!! with only 20-25 users connnected to my application. Once I restart the service I go back to a normal 10 to 50 Meg.
The session life is set at 4 hours they should die after that ?
When I go look at the _fwsession table I see many sessions that are not valid anymore.
Also is there a way to get real time list of "session + user" connected ?