Repeating Connection Errors (MySQL as data sources)

Today, we have receiving the bunch of error message, saying the app users failed to connect to the data source. Data source is Cloud MySQL. I suspect there is something wrong is happening for AppSheet server to connect to Cloud MySQL. Yesterday, there was a global outage due to DynamoDB , but I reckon it is not connected with the issues we are currently experiencing with AppSheet. Is anyone else seeing the same errors?

The below is the extract from the error message we receive by email.


Message: Error:A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught) Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught) —> System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. —> System.Net.Sockets.SocketException (104): Connection reset by peer at System.Net.Sockets.NetworkStream.Read(Byte buffer, Int32 offset, Int32 count) — End of inner exception stack trace — at System.Net.Sockets.NetworkStream.Read(Byte buffer, Int32 offset, Int32 count) at Microsoft.Data.SqlClient.SNI.SNITCPHandle.Receive(SNIPacket& packet, Int32 timeoutInMilliseconds) at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry, SqlConnectionOverrides overrides) at Microsoft.Data.SqlClient.SqlConnection.InternalOpenAsync(CancellationToken cancellationToken) — End of stack trace from previous location — at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.<>c__DisplayClass30_0`2.<b__0>d.MoveNext() — End of stack trace from previous location — at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func`4 operation, Func`4 verifySucceeded, TState state, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationAsync[TState,TResult](Func`4 operation, Func`4 verifySucceeded, TState state, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync() at MiscUtilities.IAsyncEnumerableExtensions.ToImmutableArrayAsync[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in /src/CommonUtilities/MiscUtilities/IAsyncEnumerableExtensions.cs:line 15 at MiscUtilities.IAsyncEnumerableExtensions.ToImmutableArrayAsync[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in /src/CommonUtilities/MiscUtilities/IAsyncEnumerableExtensions.cs:line 15 at LegacyDataLayer.LegacyUserDataLayer.GetTokenIdForUserAuthAsync(Int32 userId, String dataSourceName, String providerName, CancellationToken cancellationToken) in /src/Data/LegacyDataLayer/LegacyUserDataLayer.cs:line 383 at LegacyDataLayer.LegacyUserDataLayer.GetTokenIdForUserAuthAsync(Int32 userId, String dataSourceName, String providerName, CancellationToken cancellationToken) in /src/Data/LegacyDataLayer/LegacyUserDataLayer.cs:line 416 at LegacyDataLayer.LegacyDataAccessDataLayer.GetTableDataAsync(Context context, AppTemplate appTemplate, String tableDataIdentifier, Int32 userId, AppTable appTable, ItemSchema tableSchema, UseCacheOption useCache, Boolean augmentData, AppEvaluatable filter, Nullable`1 ifModifiedSinceDate, AppErrors appErrors, Boolean ignoreSecurityFilters, CancellationToken cancellationToken) in /src/Data/LegacyDataLayer/LegacyDataAccessDataLayer.cs:line 2623 at LegacyDataLayer.LegacyAppTemplateDataLayer.GetTableDataAsync(Context context, AppTemplate appTemplate, AppTable appTable, Int32 userId, Boolean augmentData, Nullable`1 ifModifiedSince, AppErrors appErrors, AppEvaluatable filter, CancellationToken cancellationToken) in /src/Data/LegacyDataLayer/LegacyAppTemplateDataLayer.cs:line 177 at ServerHandler.SyncRequestHandler.ParallelReadTable(Context perTableContext, Int32 thisUserId, String appTemplateName, AppTemplate appTemplate, AppTable appTable, TableParams tableParamsFromClient, AppErrors perTableAppErrors, DataFormat desiredFormat, ConcurrentDictionary`2 tableDataSideChannel, CancellationToken cancellationToken) in /src/ControllerHandler/ServerHandler/SyncRequestHandler.cs:line 939 at ServerHandler.SyncRequestHandler.<>c__DisplayClass31_0.<g__TableFetchAction|0>d.MoveNext() in /src/ControllerHandler/ServerHandler/SyncRequestHandler.cs:line 871 — End of stack trace from previous location — at System.Threading.Tasks.Parallel.<>c__53`1.<b__53_0>d.MoveNext() — End of stack trace from previous location — at ServerHandler.SyncRequestHandler.ReadTablesWithParallelForEach(IPerfCollector perfCollector, Context context, IReadOnlyDictionary`2 perTableParamsFromClient, String appTemplateName, AppTemplate appTemplate, DataFormat desiredFormat, IList`1 appTables, AppErrors appErrors, ConcurrentDictionary`2 tableDataOut, CancellationToken cancellationToken) in /src/ControllerHandler/ServerHandler/SyncRequestHandler.cs:line 896 at ServerHandler.SyncRequestHandler.ParallelReadTables(IPerfCollector perfCollector, Context context, String appTemplateName, AppTemplate appTemplate, AppTemplate smallClone, String tableTimestampsFromClient, Dictionary`2 perTableParamsFromClient, DataFormat desiredFormat, Boolean warnClientUpdate, CancellationToken cancellationToken) in /src/ControllerHandler/ServerHandler/SyncRequestHandler.cs:line 655 at ServerHandler.SyncRequestHandler.ExecuteSyncRequestAsync(IPerfCollector perfCollector, Context context, AppSyncRequest request, Boolean userIsAuthenticated, Boolean cookiesHasStartWithToken, String requestUrl, Uri referrer, String returnUrlParameter, String webViewParameter, String androidParameter, String isCompliantParameter, StartAppToken startAppToken, String appver, CancellationToken cancellationToken) in /src/ControllerHandler/ServerHandler/SyncRequestHandler.cs:line 440 ClientConnectionId:7dc97823-d332-4628-8463-feb1f20abe86

2 Likes

@Koichi_Tsuji we’re seeing the same on our side as well. The “handshake” errors started on Monday and we suspected some association with the AWS outage as well but now cannot find the relationship. Not sure if something changed in the handshake process between AppSheet and SQL Server Connections. Following

3 Likes

@Adam-google

Hi Adam, sorry for asking you all the time, but any thoughts from you?

1 Like

Yes. We have been facing the exact same issue as well.
This happens randomly and after couple of syncs it resolves on its own.

1 Like

Thailand, SEA Region.

I can confirm that a TCP error, “prelogin handshake error” occured many times today during app editing/sync.

Something about “TCP Provider, error: 35 - An internal exception was caught”

My data source is GSheets.

2 Likes

Vietnam,

My data source is Google Sheet

I have seen this error many time in the past 3 days in all of our apps.

2 Likes

Attn @Jose_Arteaga

2 Likes

The underlying error (“internal exception”) is basically that the connection between our server and the DB was unexpectedly dropped, which is still a pretty generic error that could be caused by various network issues. It does look like there have been a few days recently where the error rate was higher than what we normally see. I’ll bring it up with the infrastructure team.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.