AT can't be created for you. Max size of the queue is reached..


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users AT can't be created for you. Max size of the queue is reached..
# 1  
Old 11-13-2009
AT can't be created for you. Max size of the queue is reached..

I have a listener (a batch job written in shell script) that calls a perl file (say apple.pl). The listener runs at scheduled timing (say 11 pm to 6 am)&.
Owner of the listener is a common id.

My question is..

Once the listener starts running (here, Im NOT attempting to generate any reports from my application. Just starting the listener), 0kb AT jobs get queued showing the id of the listener owner.

Per second 10 AT jobs are getting queued. Max size of the queue is 29000

What will be the reason for this?

Note: This listener is working for years. We noted this weird behavior when we started getting problems last month in generating the reports since the log said at: cant be created for you. at.allow had my username.

Time being weve removed my name from at.allow so that the AT queue does not reach the max size.

Im using the d queue in my code.

When I executed the below command in my server, there was no d queue defined. I just listed a and b queue

cat /etc/cron.d/queuedefs

Will this add to the cause of the issue?

Will running any patch cause such weird behavior of the listener?

Please advise.

Code:
 apple.pl
.
.
.
$file_cnt = 0;
 AGAIN:
#  $!
#  $! Define logical for error checking
#  $!
#ACE comment: log.name was replaced with file $job_logicals/PIPE_FAUCET_STATUS_$my_pid.
$job_logicals = $ENV{JOB_LOGICALS} or die "Can't get env. JOB_LOGICALS.\n";
$my_pid = $$;
$my_file = "$job_logicals/PIPE_FAUCET_STATUS_$my_pid";
system("touch $my_file");
use my_timestamp;
$time_stamp = file_suffix();
$time_stamp = substr($time_stamp,0,16);
$file_cnt = $file_cnt + 1;
$RUNFILE = $LOGFILES . "/E401226R_" . $time_stamp . "_" . $file_cnt . ".PL";
print "Run file: $RUNFILE\n";
#ACE comment: add $my_pid as second parameter to refer to $JOB_LOGICALS/PIPE_FAUCET_STATUS_$my_pid file.
system("sqlplus -S / \@$RATING/orange.SQL $RUNFILE $my_pid");
$jobstat = $?;
if ($jobstat != 0) {
goto ERROR_CHECK;
}
system("at -f $RUNFILE -q d now");        
goto AGAIN;
ERROR_CHECK:
#  $! If job is still waiting for message then shutdown gracefully
if (-e "$my_file") {
  unlink "$my_file";
  exit;
}
exit $jobstat;
Content of orange.sql
WHENEVER SQLERROR EXIT FAILURE
SET TERMOUT ON ECHO ON DOCUMENT OFF
SET LINESIZE 250 PAGES 0
REM *************************************************************************
REM *  orange.SQL - Run stored function that checks DBMS_PIPE for message.
REM *                 Spools message to a file; message is actual DCL command
REM *                 line that will execute a report script file.
REM *************************************************************************
DEFINE SPOOLFILE = &1
REM ACE Comment: add parameter to identify file that must be deleted (replaced the logical name).
DEFINE TOKEN = &2
VARIABLE BATCH_COMMAND VARCHAR2(250);
VARIABLE ERROR_CODE    NUMBER;
EXECUTE :ERROR_CODE := SFUNC_CHECK_DBMS_PIPE('MY_REPORT_REQUEST',:BATCH_COMMAND);
SPOOL &SPOOLFILE
PRINT BATCH_COMMAND
SPOOL OFF
REM ACE Comment: log.name was replaced with file $job_logicals/PIPE_FAUCET_STATUS_$my_pid.
REM HOST $DEFINE/JOB/NOLOG PIPE_FAUCET_STATUS "MESSAGE RECEIVED"
HOST rm $JOB_LOGICALS/PIPE_FAUCET_STATUS_&TOKEN
EXIT
Content of SFUNC_CHECK_DBMS_PIPE
CREATE OR REPLACE FUNCTION SFUNC_CHECK_DBMS_PIPE
  (PIPE_NAME     IN     VARCHAR2,
   BATCH_COMMAND IN OUT VARCHAR2)
   RETURN               NUMBER
IS
   STATUS        NUMBER  := 0;
   TIME_OUT      INTEGER := 86400;  /* in seconds */
BEGIN
   STATUS := DBMS_PIPE.RECEIVE_MESSAGE(PIPE_NAME,TIME_OUT);
   DBMS_PIPE.UNPACK_MESSAGE(BATCH_COMMAND);
   RETURN(STATUS);
END;
We pass message to the pipe from a db procedure which will be called from my Oracle forms application on clicking a button (generating reports)
Below is that procedure&
CREATE OR REPLACE PROCEDURE SPROC_SUBMIT_REPORT
                           (REPORT_TYPE  IN     VARCHAR2,
                            CASE_ID      IN     VARCHAR2,
                            REQUEST_ID   IN     VARCHAR2,
                            SCENARIO_ID  IN     VARCHAR2,
                            CVRGCTGRY_CD IN     VARCHAR2,
                            CVRGTYP_CD   IN     VARCHAR2,
                            NODE_PRINTQ  IN     VARCHAR2,
                            RATING_MTHD  IN     VARCHAR2,
                            STATUS_CD    IN OUT VARCHAR2,
                            ERROR_MSG    IN OUT VARCHAR2) IS
   BATCH_COMMAND   VARCHAR2(250);
   PIPE_NAME       VARCHAR2(30) := 'MY_REPORT_REQUEST';
   PIPE_SIZE       INTEGER      := 8192;
   SERVER_SYSDATE  DATE;
   TIME_OUT        INTEGER      := 60;   /* in seconds */
BEGIN
   ERROR_MSG := NULL;
   SERVER_SYSDATE := SPACK_GET_SERVER_TIME;
   BATCH_COMMAND := 'perl ${RATING}E401226E.PL '||report_type||' '||
                case_id||' '||request_id||' '||scenario_id||' '||cvrgctgry_cd||
                ' '||cvrgtyp_cd||' '||node_printq||' '||rating_mthd||'&';
   DBMS_PIPE.PACK_MESSAGE(BATCH_COMMAND);
   STATUS_CD := DBMS_PIPE.SEND_MESSAGE(PIPE_NAME,TIME_OUT,PIPE_SIZE);
EXCEPTION
   WHEN OTHERS THEN
      STATUS_CD := '9';
      ERROR_MSG := SQLERRM;
END SPROC_SUBMIT_REPORT;


Last edited by Franklin52; 11-13-2009 at 09:02 AM.. Reason: Please use code tags!
# 2  
Old 11-13-2009
This seems to be a continuous loop?

Code:
AGAIN:

....

system("at -f $RUNFILE -q d now");        
goto AGAIN;

This User Gave Thanks to methyl For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

finding max size

Hi I have a list of 2000 records with multiple entries and I want to get the max size for each entry ABC 1 ABC 2 ABC 3 ABC 4 DEF 1 DEF 2 DEF 2 DEF 2 DEF 2 ... (9 Replies)
Discussion started by: Diya123
9 Replies

2. UNIX for Advanced & Expert Users

Max size of the attachment

Hi Gurus, I am unable to send a file which size is more than 10mb through the "sendmail" command in unix. I searched from internet and followed the path specified over there "/etc/mail/sendmail.cf" and too "/etc/mail/main.cf" but found in those files below lines. # maximum message size... (1 Reply)
Discussion started by: sanjay.login
1 Replies

3. Red Hat

Apache - max clients reached issue

Hi, I have a web application (using apache) and for the past 2 months I am getting the below error in my production environment. I want to re-produce the same issue in my non-production environment, could you please let me what all are the parameters I have to modify in order to do that. Also I... (10 Replies)
Discussion started by: senor.ram
10 Replies

4. Linux

POSIX message queue size

Hi all, Please tell me how to change POSIX message queue maximum size? "ulimit" is not a solution because it controls shell resources. But i need to control queue size before login in and starting the shell. It is needed to limit queue size for applications started before login in. Sorry for my... (7 Replies)
Discussion started by: Vourhey
7 Replies

5. AIX

Printer Queue not getting created

When I try to create first print queue in this system with the command line argument, find the output also... # /usr/lib/lpd/pio/etc/piomkjetd mkpq_jetdirect -p 'generic' -D pcl -q 'AR06_Workcenter_32' -h 'AR06_Workcenter_32' -x '9100' 0782-606 /usr/lib/lpd/pio/etc/piomgpdev: Error 'A file or... (1 Reply)
Discussion started by: giribt
1 Replies

6. UNIX for Advanced & Expert Users

Max. file size

i want to know what is the maximum file size supported by linux with ext3 file system. (1 Reply)
Discussion started by: nagalenoj
1 Replies

7. Solaris

max. size of file

I wants to ask that what is the max size of file that we can create in the unix file system. (2 Replies)
Discussion started by: sameerghogre
2 Replies

8. Solaris

Max LUN reached ? (Securepath)

Hi all, I can not present a new Lun with my EVA 5000 storage and Securepath ... I have already 16 Lun's presented to the same server (Solaris 8), but can not add the 17th :-( Do you know if we have a limitation with Solaris or Securepath ? (Config file to update, software limits ...) ... (3 Replies)
Discussion started by: unclefab
3 Replies

9. UNIX for Dummies Questions & Answers

Max I/O Size

My HP-UX 11.0 system is supporting an Oracle database. I have found a number of references on the Net to the "Max I/O size" in relation to setting Oracle parameters. How can I tell what my max i/o size is? I originally made the assumption that it was referring to my stripe size but now I think... (1 Reply)
Discussion started by: keelba
1 Replies

10. Shell Programming and Scripting

Max size of variable

What is the maximum amount of characters that you can have in a varible name in the ksh shell? (1 Reply)
Discussion started by: lesstjm
1 Replies
Login or Register to Ask a Question