Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACS script failing after a consistent amount of time

Status
Not open for further replies.

HardStuckServiceDesk

Technical User
Jun 24, 2021
3
US
Hi all, long time listener first time caller. I'm in service desk and have an ACS script running that generates an html file and gif of our callboard. After the html file and gif are made, the ACS script calls and runs a python script that uploads the html and gif to an s3 bucket that's being used as a web based callboard. The problem I'm running into is my ACS script stops generating new html and gif files consistently at 3:20 every day requiring someone remote in, stop ACS with powershell, and delete the cache folder. Wanted to see if anyone else has seen anything similar or had any advice to offer for trying to resolve this. Will post the ACS script and logs below from when it fails.

Code:
'LANGUAGE=ENU
'SERVERNAME=removed
Public Sub Main()

'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Real-Time: Split/Skill: Graphical Status: Save HTML"
'## Parameters.Add "Report: Real-Time: Split/Skill: Graphical Status: Save HTML","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "1","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Real-Time\Split/Skill\Graphical Status","_Report"
'## Parameters.Add "1","_ACD"
'## Parameters.Add "3705","_Top"
'## Parameters.Add "17910","_Left"
'## Parameters.Add "10590","_Width"
'## Parameters.Add "7665","_Height"
'## Parameters.Add "default","_TimeZone"
'## Parameters.Add "The report Real-Time\Split/Skill\Graphical Status was not found on ACD 1.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "3","Split/Skill"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "G-3,-4,0;-1,2,0","Grid1"
'## Parameters.Add "*","_EndViews"
'## Parameters.Add "C:\python\python\callboard\callboard.HTML","_Output"
'## Parameters.Add "","_Template"
'## Parameters.Add "False","_UseFonts"
Dim PauseTime, Start
PauseTime = 30 ' 

   On Error Resume Next

   cvsSrv.Reports.ACD = 1
   Set Info = cvsSrv.Reports.Reports("Real-Time\Split/Skill\Graphical Status")

   If Info Is Nothing Then
	  If cvsSrv.Interactive Then
		  MsgBox "The report Real-Time\Split/Skill\Graphical Status was not found on ACD 1.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
	  Else
	   	  Set Log = CreateObject("ACSERR.cvsLog") 
		  Log.AutoLogWrite "The report Real-Time\Split/Skill\Graphical Status was not found on ACD 1."
		  Set Log = Nothing
	  End If
   Else
	   
	   If hour(now) > 5 then
	   
	   Do While hour(now) < 21
	   
	   Start = Timer
	   
	   b = cvsSrv.Reports.CreateReport(Info,Rep)
	   If b Then
	
	      Rep.Window.Top = 3705
	      Rep.Window.Left = 17910
	      Rep.Window.Width = 10590
	      Rep.Window.Height = 7665        

	      Rep.SetProperty "Split/Skill","3"
	
	      Rep.ReportView.Add "G-3,-4,0;-1,2,0","Grid1"
	
	      b = Rep.SaveHTML("C:\python\python\callboard\callboard.HTML", True, "")
		  Set shell = CreateObject("WScript.Shell")
		  shell.CurrentDirecotry = "C:\python\python\callboard"
		  shell.run "modifyanduploadhtml.pyw"
		  
		  Do While Timer<Start+PauseTime
		  Loop
		  
	      Rep.Quit

              If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
	      Set Rep = Nothing
	   End If
	   Loop
	   
	   End If

   End If
   Set Info = Nothing
'## cvs_cmd_end

End Sub
 
CVS.Log
Code:
06-24-2021 15:21:21 Report output saved as C:\python\python\callboard\callboard.HTML
06-24-2021 15:21:51 Report for ACD 1 started: Real-Time; Split/Skill; Graphical Status
06-24-2021 15:21:51 Split/Skill: 3
06-24-2021 15:26:51 Unable to complete the requested operation.  Please try again or contact Technical Support.

Error: 364 VB error (364) Application-defined or object-defined error
Location: REngine:cvsReport:SaveHTML:10
06-24-2021 15:26:53 Report for ACD 1 started: Real-Time; Split/Skill; Graphical Status
06-24-2021 15:26:54 Unable to complete the requested operation.  Please try again or contact Technical Support.

Error: 28351 Failed to get the object into the application's memory space.
Location: REngine:cvsReport:m_ParseReport:110
06-24-2021 15:26:54 Unable to complete the requested operation.  Please try again or contact Technical Support.
CVS_OS.log
Code:
06\24\21 15:21:51 LoggingSuspendCheck  Logging temporarily suspended for this process due to low handle count. Free count less than 30 
06\24\21 15:21:52 CDList::PopHeadWait  Counter timeout - returning index ZER0. Timeout: 750 
06\24\21 15:21:52 CHList::Alloc  Out of Hlinks so cannot split new link. Requried Size: 616  Largest available: 94972650 
06\24\21 15:21:52 CHList::Alloc  Cannot allocate SM Index! Will run with index ZER0. Size required: 616 
06\24\21 15:21:52 CMem::Alloc  Unable to allocate shared memory. Tried to alloc size: 616 
06\24\21 15:21:52 CMem::Alloc  Returning NULL index.
06\24\21 15:21:52 CMem::Alloc  Returning invalid index.
06\24\21 15:21:52 CMem::Alloc  Returning index: 0 
06\24\21 15:21:52 SMAlloc  Alloc failed, returned NULL/Invalid: required size: 616 
06\24\21 15:21:52 UfoStart  PC Handle no good - returning false. Given PC:0 Msg Type:28 Len:8 
06\24\21 15:21:52 LoggingSuspendCheck  Logging temporarily suspended for this process due to low handle count. Free count less than 30
 

I had a script that I made for wallboards and if I just left it to run it would crash eventually. Your issues sounds like it might be an event that happens each night. I'd look in the windows events log to see what's happening on the system.

However, I created a batch file that would just kill all of the CMS processes and scheduled it to run with Windows every night. Then I would just schedule the CMS report to launch afterwards again.

- Stinney

“The man who asks a question is a fool for a minute, the man who does not ask is a fool for life.” - Confucius
 
Thanks Stinney. I've looked all up and down the event viewer and nothing is going on around these times. The only thing running on this machine is this process and a web browser. Guess there's no getting around it. In your bat file, does it just end all ACS processes, or does it also delete that cache file?
 

It just kills all the CMS processes:

taskkill /F /IM ACScript.exe /T
taskkill /F /IM acsrep.exe /T
taskkill /F /IM acsSRV.exe /T
taskkill /F /IM acsapp.exe /T
taskkill /F /IM acscntrl.exe /T

I suppose you could just write:

taskkill /F /IM ACS*.exe /T
taskkill /F /IM acs*.exe /T

And you could add a line to delete everything in the cache, that wouldn't hurt.


- Stinney

“The man who asks a question is a fool for a minute, the man who does not ask is a fool for life.” - Confucius
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top