questdb icon indicating copy to clipboard operation
questdb copied to clipboard

Exception while reading from stream

Open DotNetNext opened this issue 3 years ago • 6 comments

Describe the bug

Repeat steps 1、Delete tables in the web console 2、Use .net core Npgsql Operation of the database, a high probability of error

error messagae EndOfStreamException: Attempted to read past the end of the stream.

Restart the service to resolve the problem

To reproduce

No response

Expected Behavior

No response

Environment

- **QuestDB version : 6.5

Additional context

No response

DotNetNext avatar Aug 17 '22 04:08 DotNetNext

I've seen this error with real Postgres in npgsql driver. I means that TCP connection is closed from the database or network infra.

QuestDB can close idle TCP connections after a timeout configured in pg.net.connection.timeout which defaults to 300_000 ms

It should be enough to close faulty Npgsql connection without returning it to the pool and open new one to fix the problem, restart should not be needed

ideoma avatar Aug 17 '22 08:08 ideoma

This has nothing to do with PGSQL, but mainly because of the table deletion operation on your web console

DotNetNext avatar Aug 17 '22 09:08 DotNetNext

  1. Control the Web console to delete tables
  2. Start the C# program

DotNetNext avatar Aug 17 '22 09:08 DotNetNext

Modification Table Structure and Truncate table are prone to problems, others are normal

DotNetNext avatar Aug 17 '22 09:08 DotNetNext

Perhaps there is an error and connection dropped before returning the error to the client.

What is in server logs when this happens?

ideoma avatar Aug 17 '22 11:08 ideoma

C# restarts still have occasional problems

You must restart the database service to resolve the problem

DotNetNext avatar Aug 18 '22 08:08 DotNetNext