Should Execution_Contexts Fill up?

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: 1476
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Should Execution_Contexts Fill up?

Post by BLOMASKY »

I have a found my Execution Context filling up with OLD processes. Is this normal. It mostly seems to be when I call a URL to display a report.

Bruce
UnionSystems
Posts: 197
Joined: Fri Jun 17, 2016 7:10 am
Location: Brisbane Australia
Contact:

Re: Should Execution_Contexts Fill up?

Post by UnionSystems »

I though records only exists in Execution_Contexts if the process they represent has not completed. I also assume that Execution_Contexts is how AwareIM restarts a process if you shutdown AwareIM and the process is not completed running? I have observed processes that I cannot stop continuing even after an AwareIM restart and the only way I can stop them is delete the record from Execution_Contexts.

So perhaps your DISPLAY URL processes are not “finishing”?
AWS Linux, Windows Server, AIM 8.4 & 8.6
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Should Execution_Contexts Fill up?

Post by tford »

Following is an email thread with Vladimir in March 2016 regarding Execution_Contexts table (using V6 of AwareIM):

Hi Vladimir,

Re: execution_contexts table

I think there may be a bug in how the execution_contexts table operates. My gut feeling is that it is not emptied out properly.

There are a couple of threads on the forum related to this table that indicate the growth of this table can bring AwareIM to a screeching halt. We experienced that over the weekend. My compressed MySql backups grew from 24,000 kb to 188,000 kb in 3 days during the weekend when there was little if any human activity on our system. Prior to that weekend, the compressed backups had been very consistent in size for months.

During the weekend, the execution_contexts table had grown substantially:
180 records at 10 pm on March 11th
3,744 records at noon on March 14th
I went back to backups for the last couple of months and verified that the execution_contexts table never had more than 180 records until it grew like crazy over the weekend.

While I am still trying get under the hood to determine what process(es) are referenced in the additional 3,500 records that were added to execution_contexts over the weekend, I can tell you that the ones that were in the execution_contexts prior to it's growth do not make sense to me (I've listed the process names at the end of this email). I did read on a forum post that having "allow users to cancel the process" unchecked will make it more likely that the process will be in this table.

Questions for you:
1) Is there a reason that AwareIM can not automatically remove processes from this table once the user logs out?
2) Can you help me understand why "allows users to cancel the process" being unchecked puts items in this table?

Thanks!
Tom


Listing of process names in the execution_contexts table:
Student_Milestone_Log__Step_2
A_Parent_VP_1_Startup
Student__Add_One__1
A_Parent_VP_3_Add_Student_if_none
A_Parent_VP_1_Startup
Student__Add_One__1
A_Parent_VP_3_Add_Student_if_none
A_Parent_VP_1_Startup
Student__Add_One__1
A_Parent_VP_3_Add_Student_if_none
A_Parent_VP_1_Startup
Student__Add_One__1
A_Parent_VP_3_Add_Student_if_none
A_Parent_VP_1_Startup
Student__Add_One__1
A_Parent_VP_3_Add_Student_if_none
A_Parent_VP_1_Startup
Student__Add_One__1
A_Parent_VP_3_Add_Student_if_none
A_Parent_VP_1_Startup
Student__Add_One__1
A_Parent_VP_3_Add_Student_if_none
A_Parent_VP_1_Startup
Student__Add_One__1
A_Parent_VP_3_Add_Student_if_none
A_Parent_VP_1_Startup
Student__Add_One__1
A_Parent_VP_3_Add_Student_if_none
Game_Edit_1b_VIEW_GAME
Game_Edit_1a_From_Assignment
Game_Edit_1_From_Assignment_LINK_mobile
Game_Edit_1_From_Assignment_LINK_mobile
Game_Edit_1a_From_Assignment
Game_Edit_1b_VIEW_GAME
Game_Edit_1a_From_Assignment
Game_Edit_1_From_Assignment_LINK_mobile
Game_Edit_1b_VIEW_GAME
Game_Edit_1a_From_Assignment
Game_Edit_1_From_Assignment_LINK_mobile
Game_Edit_1b_VIEW_GAME
Game_Edit_1a_From_Assignment
Game_Edit_1_From_Assignment_LINK_mobile
Game_Edit_1b_VIEW_GAME
Game_Edit_1b_EDIT_GAME
Game_Edit_1_From_Assignment_NO_LINK
Game_Edit_1a_From_Assignment
Game_Edit_1a_From_Assignment
Game_Edit_1b_EDIT_GAME
Game_Edit_1_From_Assignment_NO_LINK
Game_Edit_1a_From_Assignment
Game_Edit_1b_EDIT_GAME
Game_Edit_1_From_Assignment_NO_LINK
Game_Edit_1a_From_Assignment
Game_Edit_1_From_Assignment_NO_LINK
Game_Edit_1b_EDIT_GAME
A_Parent_VP_1_Startup
A_Parent_VP_3_Add_Student_if_none
Student__Add_One__1
A_Parent_VP_1_Startup
A_Parent_VP_3_Add_Student_if_none
Student__Add_One__1
Game_Edit_1_From_Assignment_NO_LINK
Game_Edit_1b_EDIT_GAME
Game_Edit_1a_From_Assignment
Game_Edit_1a_From_Assignment
Game_Edit_1_From_Assignment_NO_LINK
Game_Edit_1b_EDIT_GAME
Game_Edit_1_From_Assignment_NO_LINK
Game_Edit_1a_From_Assignment
Game_Edit_1b_EDIT_GAME
Game_Edit_1_From_Assignment_NO_LINK
Game_Edit_1b_EDIT_GAME
Game_Edit_1a_From_Assignment
Game_Edit_1b_VIEW_GAME
Game_Edit_1a_From_Assignment
Game_Edit_1_From_Assignment_LINK
A_Parent_VP_1_Startup
A_Parent_VP_3_Add_Student_if_none
Student__Add_One__1
Game_Edit_1b_EDIT_GAME
Game_Edit_1_From_Assignment_NO_LINK
Game_Edit_1a_From_Assignment
Game_Edit_1_From_Assignment_LINK_mobile
Game_Edit_1a_From_Assignment
Game_Edit_1b_VIEW_GAME
Game_Edit_1b_VIEW_GAME
Game_Edit_1_From_Assignment_LINK
Game_Edit_1a_From_Assignment
Game_Edit_1a_From_Assignment
Game_Edit_1b_VIEW_GAME
Game_Edit_1_From_Assignment_LINK
Game_Edit_1_From_Assignment_LINK
Game_Edit_1a_From_Assignment
Game_Edit_1b_VIEW_GAME
Game_Edit_1_From_Assignment_NO_LINK
Game_Edit_1a_From_Assignment
Game_Edit_1b_EDIT_GAME
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVATION_REMOVE
Resource_Appt_Clicked
Resource_Appt_Clicked
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked_RESERVE
Resource_Appt_Clicked


====================

Vladimir's answer:

Hi Tom,

Aware IM is supposed to automatically time-out and delete pending processes and normally it does, otherwise we would be swamped with issues. However, I have seen reports like yours where people were claiming that some of the processes were not properly deleted and the table overflowed. I still don't know how to reproduce this issue and what is causing it compared to the normal behaviour of the system.

The "allow cancel" flag has nothing to do with this. The record of the process is written into the table when a process is "suspended" - that is, when there is an action that interacts with the user (ENTER NEW, EDIT, PICK FROM etc) or when there is a batch operation FIND ... IN BATCHES OF. The process is resumed when there is a reply from the user. If the user doesn't reply the suspended process is supposed to time out and be removed.

Best Regards,
Vladimir
Tom - V8.8 build 3137 - MySql / PostGres
mrbdrm
Posts: 349
Joined: Tue Oct 16, 2012 11:44 am

Re: Should Execution_Contexts Fill up?

Post by mrbdrm »

i have that issue and its making my system unresponsive until i do a manual removal of them from mysql

this issue happen when i have a process that handle downloading or displaying files. and handful of users are starting the process.

the workaround solution i found was to run a scheduled event on mysql that will remove the oldest row if the count is higher than x number (i know that there is an issue if we reach that)
this is the stored produce i run with the scheduler

Code: Select all

CREATE DEFINER=`root`@`%` PROCEDURE `live_procedure`()
BEGIN
IF ((SELECT COUNT(id) FROM execution_contexts)>10)
THEN
DELETE FROM execution_contexts ORDER BY id LIMIT 1;
END IF;
END
Jaymer
Posts: 2475
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

new forum software

Post by Jaymer »

This post, well not my post, but the one before it,
Is a perfect example of how updated forum software would allow me to:

Thumbs up To thank poster,
A way to tag it/save it/bookmark it as a favorIte
@mention it to another user. (Ex. @roger )
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
aware_support
Posts: 7526
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Should Execution_Contexts Fill up?

Post by aware_support »

Our reply to Tom is still valid - we still don't know how to reproduce the issue. We have checked the code multiple times and we cannot find the problem. The table never overflows for us. Maybe there is a scenario when it happens, but we need to be able to reproduce it. If anyone knows how, please say so.

Code: Select all

this issue happen when i have a process that handle downloading or displaying files. and handful of users are starting the process.
Can you provide more details or attach a BSV for testing?
Aware IM Support Team
Post Reply