SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    874
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trying to learn different types of error log files

    Dear All,
    I am new to using INNODB engine. The problem is that I find few different types of log files. I saw 2 files of ib_logfile what is this files for ? Then I can see 2 .err files ? Is there any other log files ?

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    the .err log files are the text logs generated by mysql for reporting errors to the server administrator.

    the inno log files are, more specifically, the transaction logs. when you write data to an inno table, the transaction logs keep track of the data until the whole transaction is complete. if the transaction is rolled back, the log contains enough data to undo the changes. the transaction log is sometimes also called the undo log.

  3. #3
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    874
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dear Longneck,
    In my case I have 2 .err files ? One is using my machine name and the other is some combination of both numbers and character. So which should I be looking into for information ? Another question I cant the see contents of my ib_logfiles0 ? How can I view them ? Also I would like to ask you the size of my ib_logfiles both has grown tremdously to 300MB from earlier just 10MB. For you information I am fully using innodb ? Hope you can help me to better understand the whole process ? Thank.

  4. #4
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    for the .err files, look at the one with the latest timestamp.

    and no, you can't look at the inno transaction logs. they're not meant for viewing. the log files will automatically grow as needed. occasionally, the garbage collector will run and reclaim unused space from old transactions. therefore the log will eventually stop growing and stay a fairly consistent size.

  5. #5
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    874
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dear Longneck,
    You are right I have been watching for a few months that my log file has stop to grow up to 300Mb. So if my transaction log need more space how will that be handle? I have gone through my .err files. Another question I have take some extracts from my .err . I am trying to understand what it means by started log sequence number 0 11318857 ? Where is the log starting from and how to get the log sequence ? What it means by Restoring possible half-written data pages from the doublewrite what id doublewrite ? ? When it is Starting an apply batch of log records to the database... does it have effect to whatever I am doing at that current time or the database is freeze for temporary ?
    Thanks.


    1st
    070505 10:41:01 InnoDB: Started; log sequence number 0 11318857
    070505 10:41:02 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: ready for connections.
    Version: '5.0.27-community-nt' socket: '' port: 3306 MySQL Community Edition (GPL)
    070505 11:06:05 InnoDB: Started; log sequence number 0 11318857
    070505 11:06:05 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: ready for connections.
    Version: '5.0.27-community-nt' socket: '' port: 3306 MySQL Community Edition (GPL)
    070505 11:14:14 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...

    2nd extract
    070507 19:14:14 InnoDB: Starting log scan based on checkpoint at
    InnoDB: log sequence number 0 11319380.
    InnoDB: Doing recovery: scanned up to log sequence number 0 11319721
    070507 19:14:14 InnoDB: Starting an apply batch of log records to the database...
    InnoDB: Progress in percents: 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
    InnoDB: Apply batch completed

  6. #6
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    when the server "was not shut down normally", innodb scans the entire transaction log to see if all transactions were completely committed and any that were not are undone.

  7. #7
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    874
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dear Longneck,
    So in this case it means it starts from number 0 11318857. So it means it has to check 11318857 number of queries is it ? What is this number reprsents exactly ? Why is it that my iblogfile is 300Mb is it normal or something is wrong somewhere ? Is there anyway for us to monitor the scanning and to view the transaction log ? I guess it is in binary format rite ? Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •