npgsql: Exception while reading from stream error while connecting to npgsql
while connecting to database from app i got Exception while reading from stream error message. I tried my app in multiple devices all are working fine except one machine. db is present in local machine. I just want to connect to it Exception message: Stack trace:
while connection.open() code is executing error produces
version: Npgsql.4.1.3.1
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (11 by maintainers)
@tally2512 this particular exception is very generic and the most important part is the inner exception, which details the reason for that exception. Now, usually it indicates some sort of network issue, like connection being lost due to PG or someone in-between closing it (for example due to inactivity, in which case enabling keepalive could help). If you still think it’s not network issue, could you please open a separate issue with the full stacktrace and exception message (including inner exceptions)?
If this works on other machines, check who interrupts the network connection or kills the PostgreSQL backend. Other roots described by @Borja-Guiles in #2711 are possible too.
Server side logs could help in further investigations.