CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • CiviContribute: Incorrect key file for table
Pages: [1]

Author Topic: CiviContribute: Incorrect key file for table  (Read 1575 times)

samw3

  • Guest
CiviContribute: Incorrect key file for table
March 19, 2009, 02:22:21 pm
Hello Forum,

After going through a rigorous upgrade of (drupal)1.8->1.9->2.0->2.1->2.2beta1->(joomla)2.2beta1->2.2stable we now receive this error when clicking on the CiviContribute link.

Does anyone know what this means, or how to fix it?

Thanks,

Sam

Code: [Select]
    Sorry. A non-recoverable error has occurred.

    DB Error: unknown error

    Database Error Code: Incorrect key file for table '/ramdisk/mysql/tmp/#sql_f9c_0.MYI'; try to repair it, 126

    Return to home page.

Error Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => SELECT DISTINCT(contact_a.id) as contact_id, contact_a.contact_type  as `contact_type`, contact_a.sort_name  as `sort_name`, contact_a.display_name  as `display_name`, civicrm_contribution.id as contribution_id, civicrm_contribution.receive_date as `receive_date`, civicrm_contribution.non_deductible_amount as `non_deductible_amount`, civicrm_contribution.total_amount as `total_amount`, civicrm_contribution.fee_amount as `fee_amount`, civicrm_contribution.net_amount as `net_amount`, civicrm_contribution.trxn_id as `trxn_id`, civicrm_contribution.invoice_id as `invoice_id`, civicrm_contribution.currency as `currency`, civicrm_contribution.cancel_date as `cancel_date`, civicrm_contribution.cancel_reason as `cancel_reason`, civicrm_contribution.receipt_date as `receipt_date`, civicrm_contribution.thankyou_date as `thankyou_date`, civicrm_contribution.source as `contribution_source`, civicrm_contribution.amount_level as `amount_level`, civicrm_contribution.is_test as `is_test`, civicrm_contribution.is_pay_later as `is_pay_later`, contribution_status.name as contribution_status_id, civicrm_contribution.check_number as `check_number`, civicrm_contribution_type.id as contribution_type_id, civicrm_contribution_type.name as contribution_type, civicrm_contribution_type.accounting_code as `accounting_code`, civicrm_product.id as product_id, civicrm_product.name as `product_name`, civicrm_product.sku as `sku`, civicrm_contribution_product.id as contribution_product_id, civicrm_contribution_product.product_option as `product_option`, civicrm_contribution_product.fulfilled_date as `fulfilled_date`, civicrm_contribution_product.start_date as `contribution_start_date`, civicrm_contribution_product.end_date as `contribution_end_date`, payment_instrument.id as instrument_id, payment_instrument.label as `payment_instrument`, civicrm_contribution.contribution_recur_id as `contribution_recur_id`, civicrm_note_contribution.note as contribution_note, payment_instrument.name as contribution_payment_instrument, civicrm_contribution.check_number as contribution_check_number, civicrm_value_1_grtl_contributions.id as civicrm_value_1_grtl_contributions_id, civicrm_value_1_grtl_contributions.check_number as custom_15, civicrm_value_1_grtl_contributions.check_date as custom_17, civicrm_value_1_grtl_contributions.contribution_credit as custom_21  FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id  INNER JOIN civicrm_contribution_type ON civicrm_contribution.contribution_type_id = civicrm_contribution_type.id  LEFT  JOIN civicrm_contribution_product ON civicrm_contribution_product.contribution_id = civicrm_contribution.id LEFT  JOIN civicrm_product ON civicrm_contribution_product.product_id =civicrm_product.id 
LEFT JOIN civicrm_value_1_grtl_contributions ON civicrm_value_1_grtl_contributions.entity_id = civicrm_contribution.id  LEFT JOIN civicrm_note civicrm_note_contribution ON ( civicrm_note_contribution.entity_table = 'civicrm_contribution' AND
                                                        civicrm_contribution.id = civicrm_note_contribution.entity_id ) LEFT JOIN civicrm_option_group option_group_payment_instrument ON ( option_group_payment_instrument.name = 'payment_instrument') LEFT JOIN civicrm_option_value payment_instrument ON (civicrm_contribution.payment_instrument_id = payment_instrument.value
                               AND option_group_payment_instrument.id = payment_instrument.option_group_id )  LEFT JOIN civicrm_option_group option_group_contribution_status ON (option_group_contribution_status.name = 'contribution_status') LEFT JOIN civicrm_option_value contribution_status ON (civicrm_contribution.contribution_status_id = contribution_status.value
                               AND option_group_contribution_status.id = contribution_status.option_group_id )  WHERE  (  civicrm_contribution.is_test = '0' )  AND  ( 1 )    ORDER BY receive_date desc  LIMIT 0, 10  [nativecode=126 ** Incorrect key file for table '/ramdisk/mysql/tmp/#sql_f9c_0.MYI'; try to repair it]
    [type] => DB_Error
    [user_info] => SELECT DISTINCT(contact_a.id) as contact_id, contact_a.contact_type  as `contact_type`, contact_a.sort_name  as `sort_name`, contact_a.display_name  as `display_name`, civicrm_contribution.id as contribution_id, civicrm_contribution.receive_date as `receive_date`, civicrm_contribution.non_deductible_amount as `non_deductible_amount`, civicrm_contribution.total_amount as `total_amount`, civicrm_contribution.fee_amount as `fee_amount`, civicrm_contribution.net_amount as `net_amount`, civicrm_contribution.trxn_id as `trxn_id`, civicrm_contribution.invoice_id as `invoice_id`, civicrm_contribution.currency as `currency`, civicrm_contribution.cancel_date as `cancel_date`, civicrm_contribution.cancel_reason as `cancel_reason`, civicrm_contribution.receipt_date as `receipt_date`, civicrm_contribution.thankyou_date as `thankyou_date`, civicrm_contribution.source as `contribution_source`, civicrm_contribution.amount_level as `amount_level`, civicrm_contribution.is_test as `is_test`, civicrm_contribution.is_pay_later as `is_pay_later`, contribution_status.name as contribution_status_id, civicrm_contribution.check_number as `check_number`, civicrm_contribution_type.id as contribution_type_id, civicrm_contribution_type.name as contribution_type, civicrm_contribution_type.accounting_code as `accounting_code`, civicrm_product.id as product_id, civicrm_product.name as `product_name`, civicrm_product.sku as `sku`, civicrm_contribution_product.id as contribution_product_id, civicrm_contribution_product.product_option as `product_option`, civicrm_contribution_product.fulfilled_date as `fulfilled_date`, civicrm_contribution_product.start_date as `contribution_start_date`, civicrm_contribution_product.end_date as `contribution_end_date`, payment_instrument.id as instrument_id, payment_instrument.label as `payment_instrument`, civicrm_contribution.contribution_recur_id as `contribution_recur_id`, civicrm_note_contribution.note as contribution_note, payment_instrument.name as contribution_payment_instrument, civicrm_contribution.check_number as contribution_check_number, civicrm_value_1_grtl_contributions.id as civicrm_value_1_grtl_contributions_id, civicrm_value_1_grtl_contributions.check_number as custom_15, civicrm_value_1_grtl_contributions.check_date as custom_17, civicrm_value_1_grtl_contributions.contribution_credit as custom_21  FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id  INNER JOIN civicrm_contribution_type ON civicrm_contribution.contribution_type_id = civicrm_contribution_type.id  LEFT  JOIN civicrm_contribution_product ON civicrm_contribution_product.contribution_id = civicrm_contribution.id LEFT  JOIN civicrm_product ON civicrm_contribution_product.product_id =civicrm_product.id 
LEFT JOIN civicrm_value_1_grtl_contributions ON civicrm_value_1_grtl_contributions.entity_id = civicrm_contribution.id  LEFT JOIN civicrm_note civicrm_note_contribution ON ( civicrm_note_contribution.entity_table = 'civicrm_contribution' AND
                                                        civicrm_contribution.id = civicrm_note_contribution.entity_id ) LEFT JOIN civicrm_option_group option_group_payment_instrument ON ( option_group_payment_instrument.name = 'payment_instrument') LEFT JOIN civicrm_option_value payment_instrument ON (civicrm_contribution.payment_instrument_id = payment_instrument.value
                               AND option_group_payment_instrument.id = payment_instrument.option_group_id )  LEFT JOIN civicrm_option_group option_group_contribution_status ON (option_group_contribution_status.name = 'contribution_status') LEFT JOIN civicrm_option_value contribution_status ON (civicrm_contribution.contribution_status_id = contribution_status.value
                               AND option_group_contribution_status.id = contribution_status.option_group_id )  WHERE  (  civicrm_contribution.is_test = '0' )  AND  ( 1 )    ORDER BY receive_date desc  LIMIT 0, 10  [nativecode=126 ** Incorrect key file for table '/ramdisk/mysql/tmp/#sql_f9c_0.MYI'; try to repair it]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT DISTINCT(contact_a.id) as contact_id, contact_a.contact_type  as `contact_type`, contact_a.sort_name  as `sort_name`, contact_a.display_name  as `display_name`, civicrm_contribution.id as contribution_id, civicrm_contribution.receive_date as `receive_date`, civicrm_contribution.non_deductible_amount as `non_deductible_amount`, civicrm_contribution.total_amount as `total_amount`, civicrm_contribution.fee_amount as `fee_amount`, civicrm_contribution.net_amount as `net_amount`, civicrm_contribution.trxn_id as `trxn_id`, civicrm_contribution.invoice_id as `invoice_id`, civicrm_contribution.currency as `currency`, civicrm_contribution.cancel_date as `cancel_date`, civicrm_contribution.cancel_reason as `cancel_reason`, civicrm_contribution.receipt_date as `receipt_date`, civicrm_contribution.thankyou_date as `thankyou_date`, civicrm_contribution.source as `contribution_source`, civicrm_contribution.amount_level as `amount_level`, civicrm_contribution.is_test as `is_test`, civicrm_contribution.is_pay_later as `is_pay_later`, contribution_status.name as contribution_status_id, civicrm_contribution.check_number as `check_number`, civicrm_contribution_type.id as contribution_type_id, civicrm_contribution_type.name as contribution_type, civicrm_contribution_type.accounting_code as `accounting_code`, civicrm_product.id as product_id, civicrm_product.name as `product_name`, civicrm_product.sku as `sku`, civicrm_contribution_product.id as contribution_product_id, civicrm_contribution_product.product_option as `product_option`, civicrm_contribution_product.fulfilled_date as `fulfilled_date`, civicrm_contribution_product.start_date as `contribution_start_date`, civicrm_contribution_product.end_date as `contribution_end_date`, payment_instrument.id as instrument_id, payment_instrument.label as `payment_instrument`, civicrm_contribution.contribution_recur_id as `contribution_recur_id`, civicrm_note_contribution.note as contribution_note, payment_instrument.name as contribution_payment_instrument, civicrm_contribution.check_number as contribution_check_number, civicrm_value_1_grtl_contributions.id as civicrm_value_1_grtl_contributions_id, civicrm_value_1_grtl_contributions.check_number as custom_15, civicrm_value_1_grtl_contributions.check_date as custom_17, civicrm_value_1_grtl_contributions.contribution_credit as custom_21  FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id  INNER JOIN civicrm_contribution_type ON civicrm_contribution.contribution_type_id = civicrm_contribution_type.id  LEFT  JOIN civicrm_contribution_product ON civicrm_contribution_product.contribution_id = civicrm_contribution.id LEFT  JOIN civicrm_product ON civicrm_contribution_product.product_id =civicrm_product.id 
LEFT JOIN civicrm_value_1_grtl_contributions ON civicrm_value_1_grtl_contributions.entity_id = civicrm_contribution.id  LEFT JOIN civicrm_note civicrm_note_contribution ON ( civicrm_note_contribution.entity_table = 'civicrm_contribution' AND
                                                        civicrm_contribution.id = civicrm_note_contribution.entity_id ) LEFT JOIN civicrm_option_group option_group_payment_instrument ON ( option_group_payment_instrument.name = 'payment_instrument') LEFT JOIN civicrm_option_value payment_instrument ON (civicrm_contribution.payment_instrument_id = payment_instrument.value
                               AND option_group_payment_instrument.id = payment_instrument.option_group_id )  LEFT JOIN civicrm_option_group option_group_contribution_status ON (option_group_contribution_status.name = 'contribution_status') LEFT JOIN civicrm_option_value contribution_status ON (civicrm_contribution.contribution_status_id = contribution_status.value
                               AND option_group_contribution_status.id = contribution_status.option_group_id )  WHERE  (  civicrm_contribution.is_test = '0' )  AND  ( 1 )    ORDER BY receive_date desc  LIMIT 0, 10  [nativecode=126 ** Incorrect key file for table '/ramdisk/mysql/tmp/#sql_f9c_0.MYI'; try to repair it]"]
)
[/code]

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviContribute: Incorrect key file for table
March 19, 2009, 02:31:47 pm

can you cut-n-paste that query into mysql shell and see if it returns

also can u do a google search on the error message. the ramdisk part seems like a corruption in temp tables

how big are your contribution / contact tables

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

samw3

  • Guest
Re: CiviContribute: Incorrect key file for table
March 19, 2009, 04:51:24 pm
Pasting the query into phpMyAdmin returns the same error.

I have googled the error and all I could find was a false mysql bug report where the mysql dev responded saying it was a disk space error.  I reported this to my client (the owners of this civicrm installation) and they contacted the hosting provider who said that disk space was not an issue.

civicrm_contribution is ~118,868 records
civicrm_contact is ~252,777 records

according to phpMyAdmin

Any solutions?

Thanks,

Sam

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviContribute: Incorrect key file for table
March 19, 2009, 05:00:43 pm

1. most likely it is a mysql error and not a lot we can do right now (other than optimize the query for future releases)

2. any chance we can get a copy of the DB? You can encrypt the DB using the script provided at bin/encryptDB.php in 2.2 and later

will potentially help us figure things out and point us towards a fix

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

samw3

  • Guest
Re: CiviContribute: Incorrect key file for table
March 23, 2009, 06:44:01 am
The client is unwilling to release a copy of their database.

However, he told me we could take out all the records that have NOT contributed in the last ten years and see if it works.  I presume he means all contacts and related records.

Do you have a couple of SQL queries that could do that?

Thanks,

Sam

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviContribute: Incorrect key file for table
March 23, 2009, 07:07:32 am

no

please do publish the sql queries if you write them. some other folks might find it useful

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • CiviContribute: Incorrect key file for table

This forum was archived on 2017-11-26.