You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found a possible issue. It seems that the SurrealDBClient doesn't maintain the connection.
I have been using the latest 0.40 version with Core NET 8.0
This is the test code I have prepared. In the SurrealDB (latest version 1.3.1) is the table tweets with only one record.
DataBaseParams dbParams = new DataBaseParams()
{
ipAddress = "192.168.0.1",
port = 8000,
username = "root",
password = "root",
database = "testdb",
dataBaseEngine = DataBaseEngine.SurrealDB
};
var surrealDBClient = new SurrealDbClient(
SurrealDbOptions
.Create()
.WithEndpoint($"ws://{dbParams.ipAddress}:{dbParams.port}/rpc")
.WithUsername(dbParams.username)
.WithPassword(dbParams.password)
.WithNamespace(dbParams.database)
.WithDatabase(dbParams.database)
.Build(),
null,
(_options) =>
{
_options.IncludeFields = true;
}
);
int iCount = 0;
do
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ssZ")} Query");
SurrealDbResponse result = await surrealDBClient.RawQuery("SELECT * FROM tweets;");
if (result.FirstOk != null)
{
Console.WriteLine($"{DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ssZ")} Total Results: {result.FirstOk?.GetValue<List<Tweet>>()?.Count}");
}
else
{
Console.WriteLine(result.FirstError?.ToString());
}
Thread.Sleep(60 * 1000);
iCount++;
} while (iCount < 100);
This code produces the following result
2024-03-27T12:06:49Z Query
2024-03-27T12:06:50Z Total Results: 1
2024-03-27T12:07:50Z Query
... It is stuck ...
I pressed CTRL+C
As seen, the first query works perfectly, but the following ones do not work or something happens with the SurreablDB and the message Iterating does not appear.
If I reduce the delay between Queries it work perfectly.
If I repeat the same experiment but with and HTTP enpoint it works perfectly.
Could you kindly take a look at it.
Bst regards.
The text was updated successfully, but these errors were encountered:
I was curious that no "ping" event was sent in your logs. And it seems I inadvertedly inverted the null check for the timer in the ping handler. I made a fix for this. The ping event is sent regularly to prevent socket to be closed.
Dear all
Thank you for your hard work.
I have found a possible issue. It seems that the SurrealDBClient doesn't maintain the connection.
I have been using the latest 0.40 version with Core NET 8.0
This is the test code I have prepared. In the SurrealDB (latest version 1.3.1) is the table tweets with only one record.
This code produces the following result
And the docker compose logs are
As seen, the first query works perfectly, but the following ones do not work or something happens with the SurreablDB and the message
Iterating
does not appear.If I reduce the delay between Queries it work perfectly.
If I repeat the same experiment but with and HTTP enpoint it works perfectly.
Could you kindly take a look at it.
Bst regards.
The text was updated successfully, but these errors were encountered: