is it a problem with lots of records in EXECUTION_CONTEXT

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

is it a problem with lots of records in EXECUTION_CONTEXT

Post by BLOMASKY »

No one is in my system, but I have over 90 records in the Aware.dbo.EXECUTION_CONTEXTS. Is this a problem? Does this self clean? I have had to restart the application 2-3 times this week. (was unresponsive). Is this either a problem or an indication of a problem somewhere?


Thanks

Bruce
chris__29
Posts: 20
Joined: Wed Dec 15, 2021 11:44 pm
Location: Australia

Re: is it a problem with lots of records in EXECUTION_CONTEXT

Post by chris__29 »

You will always end up with waiting processes in EXECUTION_CONTEXTS it should only be an issue if they say Running. However not clearing this out regularly will slow down the access to the the table as it grows and ends up fragmented.

We use a nightly process that runs at 3am which truncates the table. Providing you not running any AwareIM schedule processes as this will stop them.

EG as a Windows Task

Clear_execution_contexts.bat

Code: Select all

"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe" --host=localhost --user=XXXXX --password=XXXXX --database=YourDB YourDB< E:\Clear_execution_contexts.sql

Clear_execution_contexts.sql

Code: Select all

TRUNCATE TABLE BS.execution_contexts;
AwareIM 8.8
MySQL, MSSQL
MS Server
Australia
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: is it a problem with lots of records in EXECUTION_CONTEXT

Post by BLOMASKY »

Thanks. I only clear it out once or twice a week. Perhaps should do that nightly as well.

Thanks

Bruce
rocketman
Posts: 1239
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Re: is it a problem with lots of records in EXECUTION_CONTEXT

Post by rocketman »

I recently had a problem which I thought was related to Execution context where my server would become unresponsive. In the end it turned out to be a memory issue which I never really got to the bottom of. I first noticed in (windows) task manager that my server was VERY low on Memory and it wasn't just AIM that was sluggish - my entire server was.

Had to do a restart of my physical hardware - which I haven't had to do for over a year. That cleared whatever the problem was and all has been ok since (more than two months now. As a consequence, my execution context which had over 480 entries in started to clear down. I also noticed that the overnight backups immediately prior to the server restart hadn't completed and crashed out at around 200Mb (usual size 1.8Gb). The culprit was a very large execution context record (actually a bulk email with some attachments) that had got stuck. I had to delete that one manually and it might have been that which caused the low memory error in the first place.

Touch wood - all is well. I'm checking the backup size each morning which is a pain so I'm probably going to exclude Execution_context from the overnight and now also regularly clear down that table - which is also a pain.

I do wonder whether Support could provide some insights into why so many E_C records don't clear down automatically when they are done. I assume AIM must think they are NOT done, so maybe it's on us as developers to do something about it, but unless we KNOW why something is happening, it's really difficult (impossible) to fix it
Rocketman

V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
Post Reply