ASP.NET Web Form
Sorry my English is bad
I made script to force stop task for entity framework while getting result from query.
Because my company using OpenEdge 2007 32-bit until now and have 1446 tables.
When i run query from entity framework, i randomly get stuck and server cpu usage raise 100%.
I made script dan manages all connection to database, so admin can terminate or when a timeout occurs the progress will stop. I made it with cancellion token and task.Dispose() buat when get randomly stuck, the server cpu still 100% while the current task has been terminated admin or timeout. Dispose and CancellionToken. But when i terminate the process server cpu drops to 0%. Then how can i terminate if get stuck while getting result from server?
It doesn't get stuck forever, just stuck for a minute.
This is sample code when i get records with entity framework.
This is code for TaskUtils.QueryTask
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1240556570375356493/rn_image_picker_lib_temp_d6b357e9-a1a6-46a6-8c84-e5af468f7f0b.jpg)
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1240556571495366686/rn_image_picker_lib_temp_e02f6eca-74cf-46a0-a841-55e27546ac6e.jpg)
1 Reply
Sorry, i mean, when i stop debugging visual studio, the server cpu drop to zero.