Information Systems:WebSmart CGI Job Takes Lots of CPU
This is both for 'WebSmart CGI Job Takes Lots of CPU' and for 'Customer has Problem with Cart'.
Look at ‘work with active jobs’ (WRKACTJOB), subsystem QHTTPSVR. The ‘job’ is the server name – WEBINTER (for InfoNet), WEBSMART (for Web Orders), and WEBTEST (for testing). The ‘functions’ we are interested in are ‘PGM-QZSRCGI’. (CGI stands for ‘Common Gateway Interface’, which is the interface between the web server and programs that generate web content. The more requests there are from users, the more of these jobs will be running.)
If the WEBSMART CGI jobs are taking up a lot of CPU%, and are staying that way, it could mean there are duplicate lines in the cart. To check this, go to
UWD Extensions 60 Web Interface 52 Miscellaneous Menu 3 Find Duplicate Lines in Cart
Display Report
Report width . . . . . : 134
Position to line . . . . . Shift to column . . . . . .
Line ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+...10....+...11....+...12....
use EZ to delete dup Subtrans Trans Seq ITEM Customer Store Last name First
from file pw_trnf in Name Number Num COUNT
library xl_webspt
000001 claim 299 4 2 11005 TEST TEST
000002 claim 299 5 2 11005 TEST TEST
000003 claim 299 6 2 11005 TEST TEST
F3=Exit F12=Cancel F19=Left F20=Right F21=Split F22=Width 80
If nothing shows up in this report, you have another issue. If something does, the duplicates have to be deleted to fix the problem with the server programs (CGI’s).
The way to fix this is shown in red. On the command line, key in EZ and press enter.
Easy View a File (EZVIEW)
Type choices, press Enter.
File Name: . . . . . . . . . . . pw_trnf Name, *PRV, *SELECT
Library Name: . . . . . . . . xl_webspt Name, *LIBL
Member Name: . . . . . . . . . . Character value
Access Method . . . . . . . . . *KEY *KEY, *ARRIVAL
F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel
F13=How to use this display F24=More keys
Key in the file and library names, and press enter twice.
Rec. Length.: 32742 File: PW_TRNF Library: XL_WEBSPT Member: PW_TRNF
Rec. Count..: 2404 Access.: *KEY Mode..: INQUIRY
SCAN........: to -OR- *EQ
Field number: 1 field/text locate:
Lower Limits. 00000299 0000 US
Transacti Subtrans Name TXSEQN TXLIFE
35 _ 299 0 30
9892 _ 299 claim 1 0
9893 _ 299 claim 2 0
9903 _ 299 claim 3 0
9923 _ 299 claim 4 0
9928 D 299 claim 4 0
9927 _ 299 claim 5 0
9929 _ 299 claim 5 0
5838 _ 299 claim 6 0
9930 _ 299 claim 6 0
291 _ 305 0 30
4508 _ 305 regular 1 0
4641 _ 305 regular 2 0
557 _ 319 0 30
F2=Previous Files F3=Exit F4=Select Mode F24=More Keys
Use the ‘lower Limits’ field to position to the cart that needs to be fixed. The cart number is eight digits, so be sure to put in enough leading zeroes. There can be multiple cart types (regular, promo, claim), so be sure you are looking at the correct one. You have may have to page down to get to the duplicate cart type (‘Subtrans Name’) and line number (‘TXSEQN’). When you find the duplicate, key a D in front of it, and press enter. (I usually delete the one with the highest record number (left column).
Rec. Length.: 32742 File: PW_TRNF Library: XL_WEBSPT Member: PW_TRNF
Rec. Count..: 2422 Mode..: DELETE
Format......: RTRNF
RRN.........: 9928
Transaction Number......: 299
Subtrans Name...........: claim
Sequence Number.........: 4
Life in days............: 0
Life in hours...........: 0
Extend Each access......:
Date/Time Trans Set will: 0001-01-01-00.00.00.000000
Transaction Data........: 00895201 ?OOD
Press Enter to Delete Record Bottom
F3=Exit F4=Switch Modes F9=Paste Record F10=Paste Field F24=More Keys
Press enter again to confirm that you really do want to delete this record.
Repeat for all duplicate lines, then press F3 to exit.
This should fix the problem with the CGI jobs. If it doesn’t, you can use the disaster menu to end Web Servers, then restart them. Note that if you do that, it is possible for a user (InfoNet or Web Orders, as this will end all WebSmart servers) to lose what they are working on.