Author |
Message
|
Justin |
Posted: Fri Aug 23, 2002 7:26 am Post subject: MQ Log and Checkpoint |
|
|
Novice
Joined: 11 Dec 2001 Posts: 10 Location: New York
|
Hello,
I need some help in understanding how the checkpoint works in MQ. Is there any way to force MQ to do a checkpoint?
It seems that our QMGR was created using default values and the linear logging method is used. Consequently it kept creating log files and disk space ran out. I checked the errorlog and it says the oldest one I can delete is the first one created a month ago, which implies no checkpoint has ever been done.
How can I delete log files without crippling the current QMGR?
Hope someone can give me insight soon.
Thanks |
|
Back to top |
|
 |
jc_squire |
Posted: Sun Aug 25, 2002 6:53 pm Post subject: |
|
|
 Centurion
Joined: 14 Apr 2002 Posts: 105 Location: New Zealand
|
Hi,
Checkpoints are generated automatically by MQSeries. They are taken when the queue manager starts, at shutdown, when logging space is running low, and after every 1000 operations logged.
You must determine which files are active. However, there are a number of files that are said to be active. Active files contain the log entries required to restart the queue manager. The number of active log files is usually the same as the number of primary log files as defined in the configuration files.
If a new checkpoint is recorded in the second, or later, primary log file, then the first file becomes inactive and a new primary file is formatted and added to the end of the primary pool, restoring the number of primary files available for logging. In this way the primary log file pool can be seen to be a current set of files in an ever extending list of log files.
You must decide when inactive log files are no longer required and then archive or delete them if they are no longer of interest to your operation.
Regards _________________ J C Squire
IBM Certified Specialist - MQSeries |
|
Back to top |
|
 |
Justin |
Posted: Mon Aug 26, 2002 5:17 am Post subject: |
|
|
Novice
Joined: 11 Dec 2001 Posts: 10 Location: New York
|
Thanks, JC.
The problem I am having is that the MQMGR tells me that all of my logs are active (from the first one created). Since the linear logging method was used, many logs were created and the file system was maxed out. It seems to me that the MQ Series did not do what it is supposed to do with regard to checkpointing. What would have caused MQ Series not automatically perform checkpoint?
Justin |
|
Back to top |
|
 |
jc_squire |
Posted: Mon Aug 26, 2002 1:30 pm Post subject: |
|
|
 Centurion
Joined: 14 Apr 2002 Posts: 105 Location: New Zealand
|
Well, the only thing I can think of is long-running transactions i.e. starting units of work by specifying "SYNCPOINT_IF_PERSISTENT" on Get message options while the messages are specified as being persistent (so syncpoint applies) but not issueing the correct API calls (MQCOMMIT) thereby causing incomplete transactions. Typically, you would see these messages re-appear on the queue if the queue manager restarted - is there any evidence of this? If there is evidence of this happening, suggest you scrutinize your applications source code and double check all the API calls.
When the log files get full (primary and secondary log files), you would see errors in the error logs indicating roll back of transactions to make space and the application will be unable to perform any subsequent Put/Get operations under syncpoint in the same transaction. However, my understanding is that you are not experiencing this which indicates that your logging configuration is set higher than the disk space available i.e. you have 500mb free but the logging configuration requires 600mb. If this is the case suggest you reduce the number of Primary/Secondary log files to coincide with the disk space available. You cannot change the size of the log files.
Are the oldest log files requied indicated by AMQ7467 and AMQ7468? Are any other errors recorded in your error logs or FFST files? What version of MQ are you running? Platform? Do you have the latest patches installed?
Regards _________________ J C Squire
IBM Certified Specialist - MQSeries |
|
Back to top |
|
 |
TonyD |
Posted: Mon Aug 26, 2002 3:03 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
You may find that MQ is retaining all the log files because it thinks it needs them all to do a media recovery. Try running 'rcdmqimg' and see what happens. |
|
Back to top |
|
 |
Justin |
Posted: Tue Aug 27, 2002 2:57 pm Post subject: |
|
|
Novice
Joined: 11 Dec 2001 Posts: 10 Location: New York
|
Thank guys,
About running 'rcdmqimg':
I executed the following command against the running mqmgr.
rcdmqimg -t qmgr -m <MYQMGR>
It returned the following message.
AMQ7044: Media recovery not allowed.
What does this mean?
To JC Squire:
I use SYNCPOINT in both MQGET and MQPUT, and also use MQCMIT and MQBACK to either commit or backout. I have not experienced any undesired reappearance of messages. My question here is this: if I do not specify SYNCPOINT flag, is the default NOSYNCHPOINT?
When I checked the errorlog, both AMQ7467 & AMQ7468 indicated the first log file as the oldest one required.
Justin |
|
Back to top |
|
 |
jc_squire |
Posted: Tue Aug 27, 2002 4:06 pm Post subject: |
|
|
 Centurion
Joined: 14 Apr 2002 Posts: 105 Location: New Zealand
|
the amq7044 error indicates you have circular logging configured as rcdmqimg cannot be run on circular logs.
How many log files exist? How many primary and secondary log files do you have defined in your log file configuration? can you post your log stanza?
regards _________________ J C Squire
IBM Certified Specialist - MQSeries |
|
Back to top |
|
 |
TonyD |
Posted: Tue Aug 27, 2002 4:40 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
I must say I am a bit puzzled. You say you have AMQ7467 and 7468 messages but I have only seen these when linear logging is in place; they have no relevance when circular logging is used. As jc says, AMQ7044 indicates circular logging is implemented. Did you run 'rcdmqimg' against the qm to which the referenced error files belong? |
|
Back to top |
|
 |
Justin |
Posted: Wed Aug 28, 2002 6:44 am Post subject: |
|
|
Novice
Joined: 11 Dec 2001 Posts: 10 Location: New York
|
I am sorry, guys.
What we did was to recreate the whole MQMGR environment with the CIRCULAR logging when we could not figure out the problem in the MQMGR with the LINEAR logging.
Now, we have the circular logging in pace with the recreated Qmgr. The problems I've described with the disk space being run out was with the previous qmgr using the linear logging method.
Sorry for confusion! |
|
Back to top |
|
 |
jc_squire |
Posted: Wed Aug 28, 2002 1:14 pm Post subject: |
|
|
 Centurion
Joined: 14 Apr 2002 Posts: 105 Location: New Zealand
|
ok, no prob. Not able to help you further untill you provide the number of log files used and the log file configuration.
Regards _________________ J C Squire
IBM Certified Specialist - MQSeries |
|
Back to top |
|
 |
TonyD |
Posted: Wed Aug 28, 2002 2:32 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
In that case I think you can be sure that the log files were being retained in case media recvovery was required....however I am surprised that both the 7467 and 7468 messages referenced the oldest log file....I would have expected that the oldest log required for qm restart would have been more recent.
btw, the ability to do media recovery is possibly the main benefit of linear logging....less important these days as most logs are held on mirrored/raided/replicated disk storage. |
|
Back to top |
|
 |
|