Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Server Crashes.
Thu, Jul 30 2009 5:24 AMPermanent Link

Steve Gill
After working solidly for weeks, EDB Server suddenly started crashing today.  I couldn't
keep it running for longer than a couple of minutes before it would crash again.  This
occurred 9 times in a row before I gave up.  I eventually tracked it down to a Job I
created today.  The job only runs once per month on the last Sunday.  Once I deleted the
job the server crashes stopped happening.

Any ideas why a job would cause this, especially when the job isn't due to run yet and
hasn't run?

Regards,

Steve
Thu, Jul 30 2009 1:14 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

<< After working solidly for weeks, EDB Server suddenly started crashing
today.  I couldn't keep it running for longer than a couple of minutes
before it would crash again.  This occurred 9 times in a row before I gave
up.  I eventually tracked it down to a Job I created today.  The job only
runs once per month on the last Sunday.  Once I deleted the job the server
crashes stopped happening.

Any ideas why a job would cause this, especially when the job isn't due to
run yet and hasn't run? >>

What version of EDB are you using ?  There was a version a while ago that
would crash the server when an exception occurred in the job because the
thread that was executing the job was allowing the exception to escape the
thread.

Also, could you post or send me the job SQL ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Jul 30 2009 6:05 PMPermanent Link

Steve Gill

Hi Tim,

> What version of EDB are you using ?

EDB Manager and Server: 2.02 Build 14


> Also, could you post or send me the job SQL ?

This is the job code:

CREATE JOB "AutomaticOptimization"
RUN AS "System"
FROM DATE '2009-01-01' TO DATE '2999-01-01'
MONTHLY
ON LAST SUN OF JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
BETWEEN TIME '01:00' AND TIME '01:30'
CATEGORY ''
BEGIN       
  USE MyDatabase;
  CALL OptimizeDatabase;
  USE;
END


And the SQL for the stored procedure, although it hasn't been executed by the job yet:

CREATE PROCEDURE "OptimizeDatabase" ()
BEGIN

  DECLARE TempCursor SENSITIVE CURSOR FOR SQLStatement;
  DECLARE TableName VARCHAR;
                               
  PREPARE SQLStatement FROM
     'SELECT Name
      FROM Information.Tables';

  OPEN TempCursor;
                                        
  IF RowCount(TempCursor) > 0 THEN
     FETCH FIRST FROM TempCursor(Name) INTO TableName;
                                                                   
     WHILE NOT EOF(TempCursor) DO
        EXECUTE IMMEDIATE 'OPTIMIZE TABLE ' + TableName;

        FETCH NEXT FROM TempCursor(Name) INTO TableName;
     END WHILE;               
                                             
     SET LOG MESSAGE TO 'Database optimized';
  END IF;

  CLOSE TempCursor;

END

I also have a job to backup the database and that works without a hitch.

Regards,

Steve
Fri, Jul 31 2009 12:36 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

<< EDB Manager and Server: 2.02 Build 14 >>

That should be okay.

<< This is the job code: >>

Okay, I'll check it out and see what I can find.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Jul 31 2009 1:30 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

Yep, it's the LAST scheduling parameter for MONTHLY jobs.  It causes the
thread to crash due to an error in the "last day of the month" calculation.

A fix will be in the next build.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Jul 31 2009 6:16 PMPermanent Link

Steve Gill

> A fix will be in the next build.

Thanks Tim.
Image