Troubleshooting Data Sync

When you enable data sync for a record type, the record type caches your source data in Appian. To keep your synced data up-to-date with the source, an immediate sync occurs whenever Appian writes to the source of your data. You can also schedule daily syncs so your data is synced at least once a day.

However, 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.

This article provides troubleshooting steps for sync failures due to:

Mismatched schemas

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. There are three common causes for a mismatch between the two schemas.

  • The data type of a source field was changed
  • The name of a source field was changed
  • A source field was deleted.

To update the mappings for any of these scenarios, follow these steps:

  1. Open the record type and go to Data Model. There will be a banner at the top of the page indicating the number of record fields that are not properly mapped to a source field.
  2. Click UPDATE MAPPINGS. An Update Mappings dialog will appear.
  3. In the Source Field column, choose a source field from the dropdown. If there is a matching source field name, the column will auto-suggest the source field for you. Note that a source field can only be mapped to one record field.
  4. The Record Field Type column will reflect the Appian data type of the source field. If the data type of the source field changed, the original data type will display with an arrow pointing to the updated data type of the new source field.
  5. To remove a record field and its source field, click the delete icon.
  6. To remove all unmapped fields, click REMOVE ALL UNMAPPED FIELDS.
  7. Click OK on the dialog.
  8. Click SAVE CHANGES at the top of the Record Type Designer. Upon clicking save, a sync will run.

You can also use this mapping tool if you need to change the database table or Salesforce object that backs your record.

Invalid credentials

When you set up your Salesforce object as the 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 APPLICATIONS 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 APPLICATIONS 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.

Data source exceeds the row limit

With data sync, a record type object can sync up to 500,000 rows of data from a selected source. This limit applies to new rows of data introduced by an immediate sync.

If your source exceeds 500,000 rows, the sync will fail and the record type will be unavailable. Sources within 10% of the limit (475,000 to 500,000 rows) will sync successfully, but a warning will let you know that the source is approaching or has reached the row limit.

Mitigation steps

To keep your source from exceeding the row limit, apply one or more source filters to limit the number of rows cached in Appian from the source. If the source is expected to regularly exceed 500,000 rows, you may choose to disable data sync.

To disable data sync, you will need to change the data source from the record type's Data Model and update all references to the original record fields throughout your application.

To find specific field references 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.

    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.

Sync timeout

If you're performing a full sync (all syncs other than an immediate sync) that takes longer than 4 hours, it's possible that the sync will time out and fail. When the sync fails, the record type will become unavailable and you'll see an error in your stack trace.

A sync timeout can occur on any record type with data sync enabled, but may be more common on synced record types that use a web service as the source.

Mitigation steps

To prevent a sync from timing out, consider:

  • Allowing for larger batch sizes.
  • Adding a source filter to limit the number of rows synced in Appian.
  • Refactoring the source system to be more efficient.

If you cannot modify the above configurations, or your record type uses a database table as the source, you may choose to disable data sync on your record types that take longer than 4 hours to sync.

To disable data sync, you will need to change the data source from the record type's Data Model and update all references to the original record fields throughout your application.

To find specific field references 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.

    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 sync 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 Built: Tue, May 23, 2023 (06:12:33 PM)

On This Page

FEEDBACK