Hello,
For the last two months, I’ve focused only on app optimization and fixing performance issues.
The sync time is usually between 4–10 seconds, even though my tables are almost empty. I think that’s acceptable due to size.
However, I’m testing the app with multiple concurrent users to simulate real-world traffic. A few times each day, the sync gets completely stuck. When I open the spreadsheets, one of them (it’s random every time) is also stuck and returns the error shown in the log below.
The first group of users receives a 240-second timeout, the second group 180 seconds, the third 60 seconds, and so on. It looks like there is a one-minute cooldown, which might be related to an API quota or some other Google limitation.
I managed to reduce my data structure from 39 tables (37 in Google Sheets and 2 in AppSheet Database) spread across 20 spreadsheets down to 9 spreadsheets.
There are:
-
no formulas,
-
no empty rows,
-
no complex conditional formatting,
-
no scripts running when the error occurs.
I only have a few scripts running late at night and a few every four hours, each taking only 4–10 seconds to complete.
I’d like to move more tables to AppSheet Database, but even empty tables have a fixed sync overhead of around 3 seconds, compared to about 0.5 seconds with Google Sheets.
I also tried moving the data to Microsoft OneDrive, but I still experienced sync issues, possibly related to authentication tokens or something similar.
Half of my tables use the following security filter:
IF(
LOOKUP(USERSETTINGS("ID"), "Registry", "ID", "Permission") >= 100,
TRUE,
LOOKUP(USERSETTINGS("ID"), "Registry", "ID", "Client") = [Client]
)
At this point, I don’t know whether the issue is related to AppSheet or Google.
I need to deploy the app to my team for further testing, but right now I’m blocked and starting to consider moving away from AppSheet.
Error:
“System.Threading.Tasks.TaskCanceledException: A task was canceled.\n at ServerHandler.SyncRequestHandler.ReadTablesWithParallelForEach(IPerfCollector perfCollector, Context context, IReadOnlyDictionary2 perTableParamsFromClient, String appTemplateName, AppTemplate appTemplate, DataFormat desiredFormat, IList1 appTables, AppErrors appErrors, ConcurrentDictionary2 tableDataOut, CancellationToken cancellationToken) in /src/ControllerHandler/ServerHandler/SyncRequestHandler.cs:line 905\n at ServerHandler.SyncRequestHandler.ParallelReadTables(IPerfCollector perfCollector, Context context, String appTemplateName, AppTemplate appTemplate, AppTemplate smallClone, String tableTimestampsFromClient, Dictionary2 perTableParamsFromClient, DataFormat desiredFormat, Boolean warnClientUpdate, CancellationToken cancellationToken) in /src/ControllerHandler/ServerHandler/SyncRequestHandler.cs:line 661\n at ServerHandler.SyncRequestHandler.ExecuteSyncRequestAsync(IPerfCollector perfCollector, Context context, AppSyncRequest request, Boolean cookiesHasStartWithToken, String requestUrl, Uri referrer, String webViewParameter, String androidParameter, String isCompliantParameter, StartAppToken startAppToken, String appver, CancellationToken cancellationToken) in /src/ControllerHandler/ServerHandler/SyncRequestHandler.cs:line 438”