Troubleshooting Sync

When you enable data sync for a record type, the record type caches your source data in Appian. This gives you faster queries and better performance wherever you are working with that data in Appian.

Sometimes record types fail to sync to the source. When this happens, you can use the information in this article and in the error messages found in the monitoring view to resolve issues with sync.

Unable to sync because the data source schema does not match the record type's data model

When you enable data sync for your record type and configure your record fields, Appian automatically creates a mapping between the source schema and record type schema. The source schema includes the names, types, and uniqueness constraints of all the fields in your source. This schema must match the record type's schema in order for Appian to sync the source data.

Resolution steps

If a change is made to the source schema without making a corresponding change to the record type, the record type will fail to sync. To get sync working again, we have to refresh the mapping. There are two common causes for a mismatch between the two schemas.

A source field was changed

An aspect of a source field was changed without making the corresponding change in the record type. To get the schemas matching again, we need to refresh the record type's schema mapping and re-select the changed fields.

To refresh the mapping:

  1. Open your SQL workbench or Salesforce object to check which fields in the source were changed.
  2. Open the record type and go to Data Model.
  3. Click CONFIGURE FIELDS.
  4. In the CONFIGURE FIELDS dialog, scroll to the bottom to find the fields that were changed. Source fields that were changed and those that were previously excluded from the record type will appear at the bottom as new fields.
  5. Select the checkboxes for the changed fields.
  6. Click FINISH, then SAVE CHANGES.
  7. Update any references in your objects to the fields that were changed.

A source field was deleted

A field may have been deleted in your source, but not in the record type. To remove the deleted field from the record type, we need to refresh the record type's schema mapping.

To refresh the mapping:

  1. Open the record type and go to Data Model.
  2. Click CONFIGURE FIELDS.
  3. Click FINISH, then SAVE CHANGES.
  4. Update any references in your objects to the fields that were changed.

Unable to sync one or more rows from the source

When data is entered into your source, it is possible to enter values which aren't compatible with data sync. This means that the value in a source field may work fine in your source, but may not be a compatible value for that field in Appian when data sync is enabled.

This most commonly occurs with date fields and date and time fields. Appian has a certain range that all date and date and time values must be within in order for the source data to work with Data Sync. This range may not be the same range that is accepted by the source; so it's possible that a value can be valid in the source's range but not in Appian's. If the value of a date or date and time field isn't within the range allowed by data sync, the sync will fail.

This specific error message appears when the value of a date field in the source is outside of the range of date values that work with Data Sync. To resolve the error, we have to find the field with the invalid date value, update the value so that it is within the valid range, and then resync the record type to the source.

Resolution steps

Field Type Range Other Limits
Date Between -5877491-03-04 and 5881580-07-11 Shouldn't contain the value of 00 for the day or month, or 0000 for the year.

Date value in a database

To update the invalid date value in the database table:

  1. Confirm the name of the source database table and open the SQL Workbench or phpMyAdmin for the database.
  2. Run a SQL statement to find the date field with the invalid value.
  3. Run another SQL statement to retrieve all rows for which the field has an invalid value. Example SQL statement:

    1
    
       SELECT * FROM <table name> WHERE <field name> = <the invalid value> 
    
  4. Update the invalid field value so that it is within the valid range.
  5. Open the record type and in the navigation pane of the record type, go to Data Sync.
  6. Click START SYNC.

Date value in Salesforce

To update the invalid date value in Salesforce:

  1. Login to Salesforce.
  2. Update the invalid date field value so that it is within data sync's valid range.
  3. Open the record type and in the navigation pane of the record type and go to Data Sync.
  4. Click START SYNC.

Unable to sync because a field in one of the source rows contains an invalid value

When data is entered into your source, it is possible to enter values which aren't compatible with data sync. This means that the value in a source field may work fine in your source, but may not be a compatible value for that field in Appian when data sync is enabled.

This most commonly occurs with date fields and date and time fields. Appian has a certain range that all date and date and time values must be within in order for the source data to work with Data Sync. This range may not be the same range that is accepted by the source; so it's possible that a value can be valid in the source's range but not in Appian's. If the value of a date or date and time field isn't within the range allowed by data sync, the sync will fail.

This specific error message appears when the value of a date and time field in the source is outside of the range of date values that work with Data Sync. To resolve the error, we have to find the field with the invalid date and time value, update the value so that it is within the valid range, and then resync the record type to the source.

Resolution steps

Field Type Range Other Limits
Date & Time Between 1707-09-22 00:12:43.145224193 and 2292-04-10 23:47:16.854775806 Shouldn't contain the value of 00 for the day or month, or 0000 for the year.

Date and time value in a database

To update the invalid date and time value in the database table:

  1. In the error message, copy the issue identifier.
  2. Go to the Application View.
  3. In the Navigation menu, select System Logs.
  4. Open Application Server Log and search for the issue identifier.
  5. Read the stack trace to determine which field and value caused the error. Example error: APNX-3-1100-007: marshal: unsupported timestamp 3000-01-01 00:00:00 +0000 UTC
  6. Open the SQL Workbench or phpMyAdmin for the database.
  7. Run a SQL statement to find the date and time field with the invalid value. Example SQL statement:
    1
    
       SELECT * FROM `< table name >` WHERE date(< field name >) = `< the invalid value >
    
  8. Update the invalid field value so that it is within the valid range.
  9. Go back to the Application View and click MONITORING.
  10. Go to the RECORD SYNC STATUS tab.
  11. Select your record type and click START SYNC.

Date and time value in Salesforce

To update the invalid date and time value in Salesforce:

  1. In the error message, copy the issue identifier.
  2. Go to the Application View.
  3. In the Navigation menu, select System Logs.
  4. Open Application Server Log and search for the issue identifier.
  5. Read the stack trace to determine which field and value caused the error. Example error: APNX-3-1100-007: marshal: unsupported timestamp 3000-01-01 00:00:00 +0000 UTC
  6. Login to Salesforce.
  7. Update the invalid date and time field value so that it is within data sync's valid range.
  8. Go back to the Application View and click MONITORING.
  9. Go to the RECORD SYNC STATUS tab.
  10. Select your record type and click START SYNC.

Unable to sync with the data source due to invalid credentials

When you set up your Salesforce object as a source for your record type, you have to provide login credentials in order to access Salesforce. If the Salesforce object's credentials are determined to be invalid at the time of the sync, your sync will fail. It could simply be that the password has expired or that the credentials have changed. In order to successfully sync, you need to verify the credentials and re-sync the record type.

Resolution steps

To check the credentials and re-sync:

  1. From the Application View, open your Salesforce object for your record type.
  2. Verify that the credentials use the username-password OAuth authentication and are correct.
  3. Click TEST CONNECTION. If the test fails, contact your system administrator for help. If the test passes, continue to step 4.
  4. Click SAVE.
  5. From the Application View, click MONITORING.
  6. In the gray bar menu, click RECORD SYNC STATUS.
  7. Select your record type and click START SYNC.

For more information on authentication, credentials, and configuring a Salesforce object, see Connected Systems.

Exceeding the Row Limit

With Data Sync, your record type can sync to a source with up to 50,000 rows. If your source exceeds 50,000 rows, syncing to the source will fail. Sources with 45,000 to 50,000 rows will sync successfully, but a warning will let you know that the source is approaching or has reached the row limit.

To keep your source from exceeding the row limit, reduce the number of rows added to the source or remove rows wherever reasonable. If the source is expected to regularly exceed 50,000 rows, see Data Sync to determine if the source is still a good fit for data sync.

If you choose to disable data sync, you will need to find and update all references to the original record fields throughout your application.

Mitigation steps

To find all references to these fields in your environment:

  1. Find an instance of a reference that you need to replace.
  2. Comment it out by wrapping the reference in /* and */.
  3. Copy the string and go back to the APPLICATIONS View
  4. In the header bar of the APPLICATIONS View, click OBJECTS.
  5. In the OBJECTS View, paste the string into the search box under DESIGN OBJECTS. Note: You can search for multiple strings at once by separating each string with a space.
  6. Next to the search button, click the down arrow and select Expression.
  7. Click the search icon.

Every object that references the string will appear in your search results. Once you have located all the references in your objects, update the field references. For updating field references in interfaces, we recommend updating the references in Expression Mode.

Other errors

Sometimes record types fail to sync to the source because of issues that require troubleshooting outside of Appian. When this happens, check the error message for information to help you troubleshoot the issue or contact your system administrator for further assistance. Here are a few brief explanations of these issues and their possible causes:

Issue Error Message Possible Cause
Problem connecting to the source. Unable to sync because the data source did not respond. The source didn't respond, VPN failed, or the API limit has been reached.
Problem with the sync server. Unable to sync due to a system issue. or Not enough disk space to complete sync. The disk is full or the sync server is down.
Problem with row size. Unable to sync because a source row exceeds the size limit. A source row exceeds 1 MB.
Problem with resource use. Generic error: Unable to sync due to an error with the data source. Too much competition for resources between syncs and other processes.
Open in Github

On This Page

FEEDBACK