MySQL table crash problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eyik
    New Member
    • Jul 2010
    • 6

    MySQL table crash problem

    Dear fellow members.

    In my workplace, we have an application using php MySQL which functionality is basically storing data from user input.

    The condition is like this, we have one computer act as the server which served about 10-20 clients. each clients is inputting data using PHP application that basically running "INSERT" SQL query everytime a transaction is confirmed.

    so far, the table that stores the data has around 130k rows with 38Mb size and growing around 1000 rows per day.

    the table which stores our data was recently crashed twice ,fortunately repair table worked in both occasion.

    one of my friend suggest that one of the main reason of the crash is because the transaction occurs simultaneously among the clients. is this true?

    moreover, is there any way to prevent the table crash again?

    oh, btw we have were getting through blackout twice as well, perhaps that also contributed to the crash.
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hey.

    MySQL has no problem handling multiple transactions. If it did, half the internet would be crashing every other second :)

    A blackout could well cause a corruption in the database, yes.

    We can't really tell you much without more info. How does your table look like? What do the INSERT statements look like? What version of MySQL are you using? Which OS are you running on? etc...

    I hope you back the database up frequently? If not, you should start doing that. That way, even if it crashes permanently, you can at least restore the backup.

    Comment

    • eyik
      New Member
      • Jul 2010
      • 6

      #3
      Atli, thanks for the reply

      the table is actually consist of 28 fields, the database is running on myisam engine.

      moreover, the insert statement looks like this:
      "INSERT INTO `table` ($date, $username, $cust_id, $cust_name, $cust_channel, $cust_address, $city, $region, $doctor_id, $doctor, $spec, $doct_address, $doct_city, $product, $tc, $group, $manuf, $brand, $product_name, $present, $strength, $pack, $hna, $quantity, $cost, $cost)"

      the server actually running on win xp using phpmyadmin 2.10.3 using apache and mysql 5.0.51a (i think).

      the last crash is just after i did optimize table btw

      since the last crash i did a backup routinely everyday

      Comment

      • eyik
        New Member
        • Jul 2010
        • 6

        #4
        Atli, thanks for the reply

        the table is actually consist of 28 fields, the database is running on myisam engine.

        moreover, the insert statement looks like this:
        "INSERT INTO `table` ($date, $username, $cust_id, $cust_name, $cust_channel, $cust_address, $city, $region, $doctor_id, $doctor, $spec, $doct_address, $doct_city, $product, $tc, $group, $manuf, $brand, $product_name, $present, $strength, $pack, $hna, $quantity, $cost, $cost)"

        the server actually running on win xp using phpmyadmin 2.10.3 using apache and mysql 5.0.51a (i think).

        the last crash is just after i did optimize table btw

        Comment

        Working...